diff --git a/src/singletons/WindowManager.cpp b/src/singletons/WindowManager.cpp index bef99f77b..f02e74f57 100644 --- a/src/singletons/WindowManager.cpp +++ b/src/singletons/WindowManager.cpp @@ -79,7 +79,7 @@ void WindowManager::showAccountSelectPopup(QPoint point) w->refresh(); QPoint buttonPos = point; - w->move(buttonPos.x(), buttonPos.y()); + w->move(buttonPos.x() - 30, buttonPos.y()); w->show(); w->setFocus(); diff --git a/src/widgets/AccountSwitchPopup.cpp b/src/widgets/AccountSwitchPopup.cpp index c0d2e6e73..b7b87e693 100644 --- a/src/widgets/AccountSwitchPopup.cpp +++ b/src/widgets/AccountSwitchPopup.cpp @@ -11,9 +11,9 @@ namespace chatterino { AccountSwitchPopup::AccountSwitchPopup(QWidget *parent) - : QWidget(parent) + : BaseWindow(parent, + BaseWindow::Flags(BaseWindow::TopMost | BaseWindow::Frameless)) { - this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); #ifdef Q_OS_LINUX this->setWindowFlag(Qt::Popup); #endif @@ -38,9 +38,9 @@ AccountSwitchPopup::AccountSwitchPopup(QWidget *parent) SettingsDialog::showDialog(SettingsDialogPreference::Accounts); // }); - this->setLayout(vbox); + this->getLayoutContainer()->setLayout(vbox); - // this->setStyleSheet("background: #333"); + this->setScaleIndependantSize(200, 200); } void AccountSwitchPopup::refresh() diff --git a/src/widgets/AccountSwitchPopup.hpp b/src/widgets/AccountSwitchPopup.hpp index adbc8e051..619bfbe20 100644 --- a/src/widgets/AccountSwitchPopup.hpp +++ b/src/widgets/AccountSwitchPopup.hpp @@ -1,12 +1,13 @@ #pragma once #include "widgets/AccountSwitchWidget.hpp" +#include "widgets/BaseWindow.hpp" #include namespace chatterino { -class AccountSwitchPopup : public QWidget +class AccountSwitchPopup : public BaseWindow { Q_OBJECT