Do bounds-checking on more windows (#4797)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -13,8 +13,13 @@
|
||||
namespace chatterino {
|
||||
|
||||
ColorPickerDialog::ColorPickerDialog(const QColor &initial, QWidget *parent)
|
||||
: BasePopup({BaseWindow::EnableCustomFrame, BaseWindow::DisableLayoutSave},
|
||||
parent)
|
||||
: BasePopup(
|
||||
{
|
||||
BaseWindow::EnableCustomFrame,
|
||||
BaseWindow::DisableLayoutSave,
|
||||
BaseWindow::BoundsCheckOnShow,
|
||||
},
|
||||
parent)
|
||||
, color_()
|
||||
, dialogConfirmed_(false)
|
||||
{
|
||||
|
||||
@@ -9,8 +9,12 @@
|
||||
namespace chatterino {
|
||||
|
||||
QualityPopup::QualityPopup(const QString &channelURL, QStringList options)
|
||||
: BasePopup({BaseWindow::DisableLayoutSave},
|
||||
static_cast<QWidget *>(&(getApp()->windows->getMainWindow())))
|
||||
: BasePopup(
|
||||
{
|
||||
BaseWindow::DisableLayoutSave,
|
||||
BaseWindow::BoundsCheckOnShow,
|
||||
},
|
||||
static_cast<QWidget *>(&(getApp()->windows->getMainWindow())))
|
||||
, channelURL_(channelURL)
|
||||
{
|
||||
this->ui_.selector = new QComboBox(this);
|
||||
|
||||
@@ -31,9 +31,14 @@
|
||||
namespace chatterino {
|
||||
|
||||
SelectChannelDialog::SelectChannelDialog(QWidget *parent)
|
||||
: BaseWindow({BaseWindow::Flags::EnableCustomFrame,
|
||||
BaseWindow::Flags::Dialog, BaseWindow::DisableLayoutSave},
|
||||
parent)
|
||||
: BaseWindow(
|
||||
{
|
||||
BaseWindow::Flags::EnableCustomFrame,
|
||||
BaseWindow::Flags::Dialog,
|
||||
BaseWindow::DisableLayoutSave,
|
||||
BaseWindow::BoundsCheckOnShow,
|
||||
},
|
||||
parent)
|
||||
, selectedChannel_(Channel::getEmpty())
|
||||
{
|
||||
this->setWindowTitle("Select a channel to join");
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -37,9 +37,14 @@ QList<SplitContainer *> openPages(Window *window)
|
||||
namespace chatterino {
|
||||
|
||||
QuickSwitcherPopup::QuickSwitcherPopup(Window *parent)
|
||||
: BasePopup({BaseWindow::Flags::Frameless, BaseWindow::Flags::TopMost,
|
||||
BaseWindow::DisableLayoutSave},
|
||||
parent)
|
||||
: BasePopup(
|
||||
{
|
||||
BaseWindow::Flags::Frameless,
|
||||
BaseWindow::Flags::TopMost,
|
||||
BaseWindow::DisableLayoutSave,
|
||||
BaseWindow::BoundsCheckOnShow,
|
||||
},
|
||||
parent)
|
||||
, switcherModel_(this)
|
||||
, window(parent)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user