color theme setting is now working
This commit is contained in:
parent
0ff9f12157
commit
da19eb86bb
13 changed files with 142 additions and 33 deletions
|
@ -40,13 +40,10 @@ void Settings::apply()
|
|||
{
|
||||
QSettings settings;
|
||||
for (const std::pair<const QString, QVariant>& pair: modifiedSettings) {
|
||||
if (pair.first == "theme") {
|
||||
QString theme = pair.second.toString();
|
||||
if (theme.toLower() == "system") {
|
||||
QApplication::setStyle(Shared::Global::getInstance()->defaultSystemStyle);
|
||||
} else {
|
||||
QApplication::setStyle(theme);
|
||||
}
|
||||
if (pair.first == "style") {
|
||||
Shared::Global::setStyle(pair.second.toString());
|
||||
} else if (pair.first == "theme") {
|
||||
Shared::Global::setTheme(pair.second.toString());
|
||||
}
|
||||
|
||||
settings.setValue(pair.first, pair.second);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue