refactor: some mini feature changes in BaseWindow (#6074)

This commit is contained in:
pajlada
2025-03-13 22:20:03 +01:00
committed by GitHub
parent 55031c5108
commit fb375e149b
10 changed files with 86 additions and 68 deletions
+9 -11
View File
@@ -14,13 +14,16 @@ namespace chatterino {
using namespace literals;
AccountSwitchPopup::AccountSwitchPopup(QWidget *parent)
: BaseWindow({BaseWindow::TopMost, BaseWindow::Frameless,
BaseWindow::DisableLayoutSave},
parent)
: BaseWindow(
{
BaseWindow::TopMost,
BaseWindow::Frameless,
BaseWindow::DisableLayoutSave,
BaseWindow::LinuxPopup,
},
parent)
{
#ifdef Q_OS_LINUX
this->setWindowFlag(Qt::Popup);
#endif
this->focusOutAction = FocusOutAction::Hide;
this->setContentsMargins(0, 0, 0, 0);
@@ -92,11 +95,6 @@ void AccountSwitchPopup::refresh()
this->ui_.accountSwitchWidget->refresh();
}
void AccountSwitchPopup::focusOutEvent(QFocusEvent *)
{
this->hide();
}
void AccountSwitchPopup::paintEvent(QPaintEvent *)
{
QPainter painter(this);