mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 17:13:57 -07:00
Give them folders.
Took 18 minutes
This commit is contained in:
parent
2acee78121
commit
5de93c49f4
1 changed files with 4 additions and 3 deletions
|
|
@ -114,13 +114,14 @@ QStringMap &ThemeManager::getAvailableThemes()
|
||||||
|
|
||||||
// add default value
|
// add default value
|
||||||
availableThemes.insert(NONE_THEME_NAME, QString());
|
availableThemes.insert(NONE_THEME_NAME, QString());
|
||||||
availableThemes.insert(FUSION_THEME_NAME, QString());
|
|
||||||
availableThemes.insert(FUSION_THEME_NAME_LIGHT, QString());
|
|
||||||
availableThemes.insert(FUSION_THEME_NAME_DARK, QString());
|
|
||||||
|
|
||||||
// load themes from user profile dir
|
// load themes from user profile dir
|
||||||
dir.setPath(SettingsCache::instance().getThemesPath());
|
dir.setPath(SettingsCache::instance().getThemesPath());
|
||||||
|
|
||||||
|
availableThemes.insert(FUSION_THEME_NAME, dir.filePath("Fusion (System Default)"));
|
||||||
|
availableThemes.insert(FUSION_THEME_NAME_LIGHT, dir.filePath("Fusion (Light)"));
|
||||||
|
availableThemes.insert(FUSION_THEME_NAME_DARK, dir.filePath("Fusion (Dark)"));
|
||||||
|
|
||||||
for (QString themeName : dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Name)) {
|
for (QString themeName : dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Name)) {
|
||||||
if (!availableThemes.contains(themeName)) {
|
if (!availableThemes.contains(themeName)) {
|
||||||
availableThemes.insert(themeName, dir.absoluteFilePath(themeName));
|
availableThemes.insert(themeName, dir.absoluteFilePath(themeName));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue