Do bounds-checking on more windows (#4797)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2023-12-02 12:56:03 +01:00
committed by GitHub
parent e327ed4166
commit c4c94473ae
17 changed files with 120 additions and 38 deletions
+11 -4
View File
@@ -6,6 +6,7 @@
#include "controllers/hotkeys/HotkeyController.hpp"
#include "singletons/Settings.hpp"
#include "util/LayoutCreator.hpp"
#include "widgets/BaseWindow.hpp"
#include "widgets/helper/Button.hpp"
#include "widgets/helper/SettingsDialogTab.hpp"
#include "widgets/settingspages/AboutPage.hpp"
@@ -29,9 +30,14 @@
namespace chatterino {
SettingsDialog::SettingsDialog(QWidget *parent)
: BaseWindow({BaseWindow::Flags::DisableCustomScaling,
BaseWindow::Flags::Dialog, BaseWindow::DisableLayoutSave},
parent)
: BaseWindow(
{
BaseWindow::Flags::DisableCustomScaling,
BaseWindow::Flags::Dialog,
BaseWindow::DisableLayoutSave,
BaseWindow::BoundsCheckOnShow,
},
parent)
{
this->setObjectName("SettingsDialog");
this->setWindowTitle("Chatterino Settings");
@@ -380,9 +386,10 @@ void SettingsDialog::themeChangedEvent()
this->setPalette(palette);
}
void SettingsDialog::showEvent(QShowEvent *)
void SettingsDialog::showEvent(QShowEvent *e)
{
this->ui_.search->setText("");
BaseWindow::showEvent(e);
}
///// Widget creation helpers