1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-01 17:06:32 -05:00

Load custom Qt themes from yuzu data directory

- Directory is qt_themes, each theme must be in one folder
    - It should contain a file "style.qss"
    - It may contain an "icons" sub-directory, to override included icons
      (with files like mytheme/icons/colorful/48x48/star.png for example)
    - Directories ending by "_dark" are reserved for dark variant icons.
      They are not listed as themes in the UI.
- If theme directory contains "dark" or "midnight", theme will be considered dark
This commit is contained in:
flodavid
2024-01-18 20:51:39 +00:00
parent b911ac8516
commit c889f1bd36
10 changed files with 102 additions and 62 deletions

View File

@@ -15,6 +15,7 @@
#define CONFIG_DIR "config"
#define CRASH_DUMPS_DIR "crash_dumps"
#define DUMP_DIR "dump"
#define ICONS_DIR "icons"
#define KEYS_DIR "keys"
#define LOAD_DIR "load"
#define LOG_DIR "log"
@@ -24,7 +25,7 @@
#define SDMC_DIR "sdmc"
#define SHADER_DIR "shader"
#define TAS_DIR "tas"
#define ICONS_DIR "icons"
#define THEMES_DIR "qt_themes"
// suyu-specific files

View File

@@ -121,6 +121,7 @@ public:
GenerateSuyuPath(SuyuPath::ConfigDir, suyu_path_config);
GenerateSuyuPath(SuyuPath::CrashDumpsDir, suyu_path / CRASH_DUMPS_DIR);
GenerateSuyuPath(SuyuPath::DumpDir, suyu_path / DUMP_DIR);
GenerateSuyuPath(SuyuPath::IconsDir, suyu_path / ICONS_DIR);
GenerateSuyuPath(SuyuPath::KeysDir, suyu_path / KEYS_DIR);
GenerateSuyuPath(SuyuPath::LoadDir, suyu_path / LOAD_DIR);
GenerateSuyuPath(SuyuPath::LogDir, suyu_path / LOG_DIR);
@@ -130,7 +131,7 @@ public:
GenerateSuyuPath(SuyuPath::SDMCDir, suyu_path / SDMC_DIR);
GenerateSuyuPath(SuyuPath::ShaderDir, suyu_path / SHADER_DIR);
GenerateSuyuPath(SuyuPath::TASDir, suyu_path / TAS_DIR);
GenerateSuyuPath(SuyuPath::IconsDir, suyu_path / ICONS_DIR);
GenerateSuyuPath(SuyuPath::ThemesDir, suyu_path / THEMES_DIR);
}
private:

View File

@@ -17,6 +17,7 @@ enum class SuyuPath {
ConfigDir, // Where config files are stored.
CrashDumpsDir, // Where crash dumps are stored.
DumpDir, // Where dumped data is stored.
IconsDir, // Where Icons for Windows shortcuts are stored.
KeysDir, // Where key files are stored.
LoadDir, // Where cheat/mod files are stored.
LogDir, // Where log files are stored.
@@ -26,7 +27,7 @@ enum class SuyuPath {
SDMCDir, // Where the emulated SDMC is stored.
ShaderDir, // Where shaders are stored.
TASDir, // Where TAS scripts are stored.
IconsDir, // Where Icons for Windows shortcuts are stored.
ThemesDir, // Where users should put their custom themes
};
/**