_fontsChanged = false;
+ bool needsStyleReload =
+ ui.useCustomStyleSheet->isChecked() != ui.useCustomStyleSheet->property("storedValue").toBool()
+ || (ui.useCustomStyleSheet->isChecked() && ui.customStyleSheetPath->text() != ui.customStyleSheetPath->property("storedValue").toString());
+
SettingsPage::save();
setChangedState(false);
+ if(needsStyleReload)
+ QtUi::style()->reload();
}
QLocale AppearanceSettingsPage::selectedLocale() const {
styleSheet += loadStyleSheet("file:///" + s.value("CustomStyleSheetPath").toString(), true);
styleSheet += loadStyleSheet("file:///" + Quassel::optionValue("qss"), true);
- if(styleSheet.isEmpty())
- return;
+ if(!styleSheet.isEmpty()) {
+ QssParser parser;
+ parser.processStyleSheet(styleSheet);
+ QApplication::setPalette(parser.palette());
+ _formatCache = parser.formats();
- QssParser parser;
- parser.processStyleSheet(styleSheet);
- QApplication::setPalette(parser.palette());
- _formatCache = parser.formats();
-
- qApp->setStyleSheet(styleSheet); // pass the remaining sections to the application
+ qApp->setStyleSheet(styleSheet); // pass the remaining sections to the application
+ }
emit changed();
}