fix: prevent unnecessary layout saves (#4201)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
namespace chatterino {
|
||||
|
||||
ColorPickerDialog::ColorPickerDialog(const QColor &initial, QWidget *parent)
|
||||
: BasePopup(BaseWindow::EnableCustomFrame, parent)
|
||||
: BasePopup({BaseWindow::EnableCustomFrame, BaseWindow::DisableLayoutSave},
|
||||
parent)
|
||||
, color_()
|
||||
, dialogConfirmed_(false)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
namespace chatterino {
|
||||
|
||||
NotificationPopup::NotificationPopup()
|
||||
: BaseWindow(BaseWindow::Frameless)
|
||||
: BaseWindow({BaseWindow::Frameless, BaseWindow::DisableLayoutSave})
|
||||
, channel_(std::make_shared<Channel>("notifications", Channel::Type::None))
|
||||
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
namespace chatterino {
|
||||
|
||||
QualityPopup::QualityPopup(const QString &channelURL, QStringList options)
|
||||
: BasePopup({},
|
||||
: BasePopup({BaseWindow::DisableLayoutSave},
|
||||
static_cast<QWidget *>(&(getApp()->windows->getMainWindow())))
|
||||
, channelURL_(channelURL)
|
||||
{
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
namespace chatterino {
|
||||
|
||||
SelectChannelDialog::SelectChannelDialog(QWidget *parent)
|
||||
: BaseWindow(
|
||||
{BaseWindow::Flags::EnableCustomFrame, BaseWindow::Flags::Dialog},
|
||||
parent)
|
||||
: BaseWindow({BaseWindow::Flags::EnableCustomFrame,
|
||||
BaseWindow::Flags::Dialog, BaseWindow::DisableLayoutSave},
|
||||
parent)
|
||||
, selectedChannel_(Channel::getEmpty())
|
||||
{
|
||||
this->setWindowTitle("Select a channel to join");
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
namespace chatterino {
|
||||
|
||||
SettingsDialog::SettingsDialog(QWidget *parent)
|
||||
: BaseWindow(
|
||||
{BaseWindow::Flags::DisableCustomScaling, BaseWindow::Flags::Dialog},
|
||||
parent)
|
||||
: BaseWindow({BaseWindow::Flags::DisableCustomScaling,
|
||||
BaseWindow::Flags::Dialog, BaseWindow::DisableLayoutSave},
|
||||
parent)
|
||||
{
|
||||
this->setObjectName("SettingsDialog");
|
||||
this->setWindowTitle("Chatterino Settings");
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace chatterino {
|
||||
|
||||
UpdateDialog::UpdateDialog()
|
||||
: BaseWindow({BaseWindow::Frameless, BaseWindow::TopMost,
|
||||
BaseWindow::EnableCustomFrame})
|
||||
BaseWindow::EnableCustomFrame, BaseWindow::DisableLayoutSave})
|
||||
{
|
||||
auto layout =
|
||||
LayoutCreator<UpdateDialog>(this).setLayoutType<QVBoxLayout>();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace chatterino {
|
||||
|
||||
WelcomeDialog::WelcomeDialog()
|
||||
: BaseWindow(BaseWindow::EnableCustomFrame)
|
||||
: BaseWindow({BaseWindow::EnableCustomFrame, BaseWindow::DisableLayoutSave})
|
||||
{
|
||||
this->setWindowTitle("Chatterino quick setup");
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace {
|
||||
const QSize QuickSwitcherPopup::MINIMUM_SIZE(500, 300);
|
||||
|
||||
QuickSwitcherPopup::QuickSwitcherPopup(QWidget *parent)
|
||||
: BasePopup(FlagsEnum<BaseWindow::Flags>{BaseWindow::Flags::Frameless,
|
||||
BaseWindow::Flags::TopMost},
|
||||
: BasePopup({BaseWindow::Flags::Frameless, BaseWindow::Flags::TopMost,
|
||||
BaseWindow::DisableLayoutSave},
|
||||
parent)
|
||||
, switcherModel_(this)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user