fix: prevent unnecessary layout saves (#4201)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
kornes
2022-12-03 10:50:22 +00:00
committed by GitHub
parent edd4789bf7
commit 188782ddca
18 changed files with 42 additions and 24 deletions
+2 -1
View File
@@ -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)
{
+1 -1
View File
@@ -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))
{
+1 -1
View File
@@ -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)
{
+3 -3
View File
@@ -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");
+3 -3
View File
@@ -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");
+1 -1
View File
@@ -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>();
+1 -1
View File
@@ -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)
{