mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixed user popup size issues
This commit is contained in:
parent
343cd3970a
commit
3158ed4085
2 changed files with 17 additions and 11 deletions
|
@ -521,7 +521,7 @@ void BaseWindow::resizeEvent(QResizeEvent *)
|
|||
getApp()->windows->queueSave();
|
||||
#endif
|
||||
|
||||
this->moveIntoDesktopRect(this);
|
||||
//this->moveIntoDesktopRect(this);
|
||||
|
||||
this->calcButtonsSizes();
|
||||
}
|
||||
|
|
|
@ -55,8 +55,8 @@ UserInfoPopup::UserInfoPopup()
|
|||
|
||||
auto app = getApp();
|
||||
|
||||
auto layout =
|
||||
LayoutCreator<UserInfoPopup>(this).setLayoutType<QVBoxLayout>();
|
||||
auto layout = LayoutCreator<QWidget>(this->getLayoutContainer())
|
||||
.setLayoutType<QVBoxLayout>();
|
||||
|
||||
// first line
|
||||
auto head = layout.emplace<QHBoxLayout>().withoutMargin();
|
||||
|
@ -223,26 +223,32 @@ UserInfoPopup::UserInfoPopup()
|
|||
});
|
||||
}
|
||||
|
||||
// this->setStyleSheet("font-size: 11pt;");
|
||||
|
||||
this->installEvents();
|
||||
|
||||
this->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Policy::Ignored);
|
||||
}
|
||||
|
||||
void UserInfoPopup::themeChangedEvent()
|
||||
{
|
||||
BaseWindow::themeChangedEvent();
|
||||
|
||||
this->setStyleSheet(
|
||||
"background: #333; font-size: " +
|
||||
QString::number(getFonts()
|
||||
->getFont(FontStyle::UiMediumBold, this->scale())
|
||||
.pixelSize()) +
|
||||
"px;");
|
||||
for (auto &&child : this->findChildren<QCheckBox *>())
|
||||
{
|
||||
child->setFont(getFonts()->getFont(FontStyle::UiMedium, this->scale()));
|
||||
}
|
||||
}
|
||||
|
||||
void UserInfoPopup::scaleChangedEvent(float /*scale*/)
|
||||
{
|
||||
themeChangedEvent();
|
||||
|
||||
QTimer::singleShot(20, this, [this] {
|
||||
auto geo = this->geometry();
|
||||
geo.setWidth(10);
|
||||
geo.setHeight(10);
|
||||
|
||||
this->setGeometry(geo);
|
||||
});
|
||||
}
|
||||
|
||||
void UserInfoPopup::installEvents()
|
||||
|
|
Loading…
Reference in a new issue