feat: add system theme on Qt 6.5 and up (#5118)
* feat: add system theme on Qt 6.5 * chroe: add changelog entry * refactor: add separate settings * fix: qt 5 * Update changelog entry --------- Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -46,6 +46,7 @@ public:
|
||||
void initialize(Settings &settings, const Paths &paths) final;
|
||||
|
||||
bool isLightTheme() const;
|
||||
bool isSystemTheme() const;
|
||||
|
||||
struct TabColors {
|
||||
QColor text;
|
||||
@@ -153,6 +154,9 @@ public:
|
||||
pajlada::Signals::NoArgSignal updated;
|
||||
|
||||
QStringSetting themeName{"/appearance/theme/name", "Dark"};
|
||||
QStringSetting lightSystemThemeName{"/appearance/theme/lightSystem",
|
||||
"Light"};
|
||||
QStringSetting darkSystemThemeName{"/appearance/theme/darkSystem", "Dark"};
|
||||
|
||||
private:
|
||||
bool isLight_ = false;
|
||||
@@ -164,6 +168,8 @@ private:
|
||||
// This will only be populated when auto-reloading themes
|
||||
QJsonObject currentThemeJson_;
|
||||
|
||||
QObject lifetime_;
|
||||
|
||||
/**
|
||||
* Figure out which themes are available in the Themes directory
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user