1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-20 13:02:08 -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

@@ -165,6 +165,12 @@ class GMainWindow : public QMainWindow {
CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING,
};
/**
* Try to load a stylesheet from its path. If the path starts with ":/", its embedded in the app
* @returns true if the text file could be opened as read-only
*/
bool tryLoadStylesheet(const QString& theme_path);
public:
void filterBarSetChecked(bool state);
void UpdateUITheme();