mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
improved performance of opening the settings dialog
This commit is contained in:
parent
4a69095d5f
commit
0bb112a3c2
|
@ -28,13 +28,15 @@ SettingsDialog::SettingsDialog()
|
|||
{
|
||||
this->setWindowTitle("Chatterino Settings");
|
||||
|
||||
this->themeChangedEvent();
|
||||
this->scaleChangedEvent(this->scale());
|
||||
|
||||
this->initUi();
|
||||
this->addTabs();
|
||||
|
||||
this->scaleChangedEvent(this->scale());
|
||||
|
||||
this->overrideBackgroundColor_ = QColor("#111111");
|
||||
this->themeChangedEvent();
|
||||
this->scaleChangedEvent(
|
||||
this->scale()); // execute twice to fix performance + width of item
|
||||
|
||||
this->resize(815, 600);
|
||||
}
|
||||
|
@ -273,6 +275,7 @@ void SettingsDialog::scaleChangedEvent(float newDpi)
|
|||
|
||||
this->setStyleSheet(styleSheet);
|
||||
|
||||
if (this->ui_.tabContainerContainer)
|
||||
this->ui_.tabContainerContainer->setFixedWidth(int(150 * newDpi));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue