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