mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 19:40:18 -07:00
Load custom theme before initializing main window
Improves debug build startup time with custom themes
This commit is contained in:
parent
b323c4e6be
commit
5b4a940842
3 changed files with 2 additions and 8 deletions
|
@ -88,6 +88,7 @@ UIThemeManager::UIThemeManager()
|
|||
else {
|
||||
loadColorsFromJSONConfig();
|
||||
applyPalette();
|
||||
applyStyleSheet();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,11 +100,6 @@ UIThemeManager *UIThemeManager::instance()
|
|||
|
||||
void UIThemeManager::applyStyleSheet() const
|
||||
{
|
||||
if (!m_useCustomTheme) {
|
||||
qApp->setStyleSheet({});
|
||||
return;
|
||||
}
|
||||
|
||||
QFile qssFile(":uitheme/stylesheet.qss");
|
||||
if (!qssFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
qApp->setStyleSheet({});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue