Mercurial > minori
annotate include/gui/theme.h @ 229:adc20fa321c1
theme: force Fusion style on platforms other than Win32 or OS X
I was reluctant to do this, but most of the other styles just
look like pure shite regardless of whether I force a stylesheet
on them or not. KDE's style is actually hilariously bad paired
with my stylesheet, so I've decided to also make the stylesheet
Windows-specific as well, because that's really the only platform
where it makes sense in the first place.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 10 Jan 2024 21:23:57 -0500 |
parents | 39521c47c7a3 |
children | 862d0d8619f6 |
rev | line source |
---|---|
102 | 1 #ifndef __gui__theme_h |
2 #define __gui__theme_h | |
3 | |
4 #include <QStyle> | |
5 | |
6 enum class Themes { | |
7 OS, | |
8 LIGHT, | |
9 DARK | |
10 }; | |
11 | |
12 namespace Theme { | |
13 | |
14 class Theme final { | |
15 public: | |
16 Theme(Themes theme = Themes::OS); | |
17 void SetTheme(Themes theme); | |
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
18 Themes GetTheme() const; |
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
19 bool IsInDarkTheme() const; |
105
6d8da6e64d61
theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents:
102
diff
changeset
|
20 void RepaintCurrentTheme(); |
102 | 21 |
22 private: | |
23 void SetToDarkTheme(); | |
24 void SetToLightTheme(); | |
25 void SetStyleSheet(Themes theme); | |
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
26 Themes GetCurrentOSTheme() const; |
102 | 27 Themes theme; |
28 }; | |
29 | |
30 } // namespace Theme | |
31 | |
32 #endif // __gui__theme_h |