annotate include/gui/theme.h @ 263:96416310ea14

pages/seasons: finish season menu implementation
author Paper <paper@paper.us.eu.org>
date Wed, 03 Apr 2024 20:46:40 -0400
parents 3ec7804abf17
children 657fda1b9cac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
261
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
1 #ifndef MINORI_GUI_THEME_H_
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
2 #define MINORI_GUI_THEME_H_
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 #include <QStyle>
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6 enum class Themes {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
7 OS,
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
8 LIGHT,
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 DARK
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10 };
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
12 namespace Theme {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14 class Theme final {
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
15 public:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
16 Theme(Themes theme = Themes::OS);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
17 void SetTheme(Themes theme);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
18 Themes GetTheme() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
19 bool IsInDarkTheme() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
20 void RepaintCurrentTheme();
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
21
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
22 private:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
23 void SetToDarkTheme();
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
24 void SetToLightTheme();
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
25 void SetStyleSheet(Themes theme);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
26 Themes GetCurrentOSTheme() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 118
diff changeset
27 Themes theme;
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
28 };
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
29
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
30 } // namespace Theme
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
31
261
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
32 #endif // MINORI_GUI_THEME_H_