mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 08:33:54 -07:00
Start from effective config.
Took 8 minutes
This commit is contained in:
parent
79bb8a9572
commit
59afc7047a
1 changed files with 7 additions and 7 deletions
|
|
@ -210,14 +210,14 @@ ThemeConfig ThemeManager::effectiveThemeConfig(const QString &themeName)
|
|||
return result;
|
||||
}
|
||||
|
||||
void ThemeManager::setStyleName(const QString &styleName)
|
||||
void ThemeManager::setStyleName(const QString &style)
|
||||
{
|
||||
const QString themeName = SettingsCache::instance().getThemeName();
|
||||
const QString dirPath = getAvailableThemes().value(themeName);
|
||||
const QString userDirPath = userThemeDirFor(themeName);
|
||||
|
||||
ThemeConfig cfg = ThemeConfig::fromThemeDir(dirPath);
|
||||
cfg.styleName = styleName;
|
||||
ThemeConfig cfg = effectiveThemeConfig(themeName);
|
||||
|
||||
cfg.styleName = style;
|
||||
cfg.save(userDirPath);
|
||||
|
||||
reloadCurrentTheme();
|
||||
|
|
@ -292,13 +292,13 @@ bool ThemeManager::savePaletteConfig(const QString &themeDirPath, const QString
|
|||
void ThemeManager::setColorScheme(const QString &scheme)
|
||||
{
|
||||
const QString themeName = SettingsCache::instance().getThemeName();
|
||||
const QString dirPath = getAvailableThemes().value(themeName);
|
||||
const QString userDirPath = userThemeDirFor(themeName);
|
||||
|
||||
// Read base config from system; write the scheme override to user dir
|
||||
ThemeConfig cfg = ThemeConfig::fromThemeDir(dirPath);
|
||||
ThemeConfig cfg = effectiveThemeConfig(themeName);
|
||||
|
||||
cfg.colorScheme = scheme;
|
||||
cfg.save(userDirPath);
|
||||
|
||||
reloadCurrentTheme();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue