adjusted size of user switch popup

This commit is contained in:
fourtf 2019-09-08 12:43:12 +02:00
parent b14154a811
commit 4ec10e720c
3 changed files with 7 additions and 6 deletions

View file

@ -79,7 +79,7 @@ void WindowManager::showAccountSelectPopup(QPoint point)
w->refresh(); w->refresh();
QPoint buttonPos = point; QPoint buttonPos = point;
w->move(buttonPos.x(), buttonPos.y()); w->move(buttonPos.x() - 30, buttonPos.y());
w->show(); w->show();
w->setFocus(); w->setFocus();

View file

@ -11,9 +11,9 @@
namespace chatterino { namespace chatterino {
AccountSwitchPopup::AccountSwitchPopup(QWidget *parent) AccountSwitchPopup::AccountSwitchPopup(QWidget *parent)
: QWidget(parent) : BaseWindow(parent,
BaseWindow::Flags(BaseWindow::TopMost | BaseWindow::Frameless))
{ {
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
this->setWindowFlag(Qt::Popup); this->setWindowFlag(Qt::Popup);
#endif #endif
@ -38,9 +38,9 @@ AccountSwitchPopup::AccountSwitchPopup(QWidget *parent)
SettingsDialog::showDialog(SettingsDialogPreference::Accounts); // SettingsDialog::showDialog(SettingsDialogPreference::Accounts); //
}); });
this->setLayout(vbox); this->getLayoutContainer()->setLayout(vbox);
// this->setStyleSheet("background: #333"); this->setScaleIndependantSize(200, 200);
} }
void AccountSwitchPopup::refresh() void AccountSwitchPopup::refresh()

View file

@ -1,12 +1,13 @@
#pragma once #pragma once
#include "widgets/AccountSwitchWidget.hpp" #include "widgets/AccountSwitchWidget.hpp"
#include "widgets/BaseWindow.hpp"
#include <QWidget> #include <QWidget>
namespace chatterino { namespace chatterino {
class AccountSwitchPopup : public QWidget class AccountSwitchPopup : public BaseWindow
{ {
Q_OBJECT Q_OBJECT