UI: Add ability to parse OBSStyle from qss

Adds the ability to set the current palette for the program via adding
"OBSTheme" objects to the qss files.  The values for the OBSTheme object
are the values used by QPalette::ColorRole.

Modifying the global palette allows the ability to easily/quickly look
up application theme colors (especially if you would like to use them
for QML), as well as the ability to fix the hyperlink color issue.  (On
dark themes, links would still be dark blue, causing them to be
difficult to see)
This commit is contained in:
jp9000
2018-07-04 21:01:22 -07:00
parent 8b6d437a97
commit e1ab9a0fc4
5 changed files with 309 additions and 1 deletions

View File

@@ -87,6 +87,12 @@ private:
inline void ResetHotkeyState(bool inFocus);
QPalette defaultPalette;
void ParseExtraThemeData(const char *path);
void AddExtraThemeColor(QPalette &pal, int group,
const char *name, uint32_t color);
public:
OBSApp(int &argc, char **argv, profiler_name_store_t *store);
~OBSApp();