BaseWindow smol refactor

This commit is contained in:
fourtf
2019-09-08 21:45:46 +02:00
parent 3158ed4085
commit 4f356f80cf
14 changed files with 43 additions and 49 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ namespace {
} // namespace
EmotePopup::EmotePopup(QWidget *parent)
: BaseWindow(parent, BaseWindow::EnableCustomFrame)
: BaseWindow(BaseWindow::EnableCustomFrame, parent)
{
auto layout = new QVBoxLayout(this);
this->getLayoutContainer()->setLayout(layout);
+1 -1
View File
@@ -11,7 +11,7 @@
namespace chatterino {
NotificationPopup::NotificationPopup()
: BaseWindow((QWidget *)nullptr, BaseWindow::Frameless)
: BaseWindow(BaseWindow::Frameless)
, channel_(std::make_shared<Channel>("notifications", Channel::Type::None))
{
+1 -1
View File
@@ -19,7 +19,7 @@
namespace chatterino {
SelectChannelDialog::SelectChannelDialog(QWidget *parent)
: BaseWindow(parent, BaseWindow::EnableCustomFrame)
: BaseWindow(BaseWindow::EnableCustomFrame, parent)
, selectedChannel_(Channel::getEmpty())
{
this->setWindowTitle("Select a channel to join");
+2 -2
View File
@@ -24,7 +24,7 @@ namespace chatterino {
SettingsDialog *SettingsDialog::handle = nullptr;
SettingsDialog::SettingsDialog()
: BaseWindow(nullptr, BaseWindow::DisableCustomScaling)
: BaseWindow(BaseWindow::DisableCustomScaling)
{
this->setWindowTitle("Chatterino Settings");
@@ -41,7 +41,7 @@ SettingsDialog::SettingsDialog()
void SettingsDialog::initUi()
{
auto outerBox = LayoutCreator<SettingsDialog>(this)
auto outerBox = LayoutCreator<QWidget>(this->getLayoutContainer())
.setLayoutType<QVBoxLayout>()
.withoutSpacing();
+2 -3
View File
@@ -11,9 +11,8 @@
namespace chatterino {
UpdateDialog::UpdateDialog()
: BaseWindow(nullptr,
BaseWindow::Flags(BaseWindow::Frameless | BaseWindow::TopMost |
BaseWindow::EnableCustomFrame))
: BaseWindow({BaseWindow::Frameless, BaseWindow::TopMost,
BaseWindow::EnableCustomFrame})
{
auto layout =
LayoutCreator<UpdateDialog>(this).setLayoutType<QVBoxLayout>();
+1 -2
View File
@@ -43,8 +43,7 @@ namespace {
} // namespace
UserInfoPopup::UserInfoPopup()
: BaseWindow(nullptr, BaseWindow::Flags(BaseWindow::Frameless |
BaseWindow::FramelessDraggable))
: BaseWindow({BaseWindow::Frameless, BaseWindow::FramelessDraggable})
, hack_(new bool)
{
this->setStayInScreenRect(true);
+1 -1
View File
@@ -3,7 +3,7 @@
namespace chatterino {
WelcomeDialog::WelcomeDialog()
: BaseWindow(nullptr, BaseWindow::EnableCustomFrame)
: BaseWindow(BaseWindow::EnableCustomFrame)
{
this->setWindowTitle("Chatterino quick setup");
}