annotate src/gui/theme.cc @ 393:963047512d34

*: clang-format
author Paper <paper@tflc.us>
date Fri, 07 Nov 2025 07:16:15 -0500
parents 47c9f8502269
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
1 #include "gui/theme.h"
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 #include "core/config.h"
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3 #include "core/session.h"
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 #include <QApplication>
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
5 #include <QDebug>
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6 #include <QFile>
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
7 #include <QStyle>
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
8 #include <QStyleFactory>
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 #include <QTextStream>
291
9a88e1725fd2 *: refactor lots of stuff
Paper <paper@paper.us.eu.org>
parents: 279
diff changeset
10 #include <QtGlobal>
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11 #ifdef MACOSX
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
12 # include "sys/osx/dark_theme.h"
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
13 #elif defined(WIN32)
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
14 # include "sys/win32/dark_theme.h"
232
ff0061e75f0f theme: add OS detection with glib
Paper <mrpapersonic@gmail.com>
parents: 230
diff changeset
15 #else
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
16 # ifdef GLIB
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
17 # include "sys/glib/dark_theme.h"
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
18 # endif
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
19 # ifdef HAVE_XCB
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
20 # include "sys/x11/dark_theme.h"
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
21 # endif
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
22 #endif
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
23
229
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 183
diff changeset
24 /* Weird quirks of this implementation:
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 183
diff changeset
25 * 1. Dark mode stuff in Qt changes a lot and Qt 5 and Qt 6 are massively different
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 183
diff changeset
26 * 2. Some widgets, i.e. QTabWidget, QTabBar, etc., just completely IGNORE the QPalette setting
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 183
diff changeset
27 * on different platforms and the only way to fix it is by using Fusion
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 183
diff changeset
28 * 3. Windows dark mode support in Qt 6.5 (with Fusion) is completely unavoidable
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
29 */
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
30
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
31 namespace Theme {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
32
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
33 ThemeManager::ThemeManager(Theme theme)
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
34 {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
35 this->theme = theme;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
36 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
37
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
38 Theme ThemeManager::GetTheme() const
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
39 {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
40 return theme;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
41 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
42
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
43 bool ThemeManager::IsInDarkTheme() const
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
44 {
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
45 switch (theme) {
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
46 case Theme::Default:
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
47 #ifdef MACOSX
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
48 if (osx::DarkThemeAvailable())
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
49 return osx::IsInDarkTheme();
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
50 #elif defined(WIN32)
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
51 if (win32::DarkThemeAvailable())
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
52 return win32::IsInDarkTheme();
232
ff0061e75f0f theme: add OS detection with glib
Paper <mrpapersonic@gmail.com>
parents: 230
diff changeset
53 #else
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
54 # ifdef HAVE_XCB
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
55 if (x11::IsInDarkTheme())
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
56 return true;
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
57 # endif
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
58 # ifdef GLIB
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
59 if (glib::IsInDarkTheme())
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
60 return true;
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
61 # endif
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
62 break;
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
63 #endif
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
64 default:
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
65 break;
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
66 }
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
67 return (theme == Theme::Dark);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
68 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
69
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
70 void ThemeManager::SetToDarkTheme()
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
71 {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
72 /* macOS >= 10.14 has its own global dark theme,
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
73 use it :) */
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
74 #ifdef MACOSX
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
75 if (osx::DarkThemeAvailable())
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
76 osx::SetToDarkTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
77 else
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
78 #elif defined(WIN32)
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
79 if (win32::DarkThemeAvailable())
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
80 win32::SetTitleBarsToBlack(true);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
81 #endif
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
82 SetStyleSheet(Theme::Dark);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
83 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
84
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
85 void ThemeManager::SetToLightTheme()
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
86 {
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
87 #ifdef MACOSX
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
88 if (osx::DarkThemeAvailable())
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
89 osx::SetToLightTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
90 else
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
91 #elif defined(WIN32)
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
92 if (win32::DarkThemeAvailable())
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
93 win32::SetTitleBarsToBlack(false);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
94 #endif
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
95 SetStyleSheet(Theme::Light);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
96 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
97
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
98 Theme ThemeManager::GetCurrentOSTheme() const
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
99 {
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
100 return IsInDarkTheme() ? Theme::Dark : Theme::Light;
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
101 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
103 /* this function is private, and should stay that way */
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
104 void ThemeManager::SetStyleSheet(Theme theme)
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
105 {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
106 switch (theme) {
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
107 case Theme::Dark: {
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
108 const QColor darkGray(53, 53, 53);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
109 const QColor gray(128, 128, 128);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
110 const QColor black(25, 25, 25);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
111 const QColor blue(42, 130, 218);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
112
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
113 QPalette pal;
305
91ac90a34003 core/time: remove Duration class, use regular functions instead
Paper <paper@paper.us.eu.org>
parents: 291
diff changeset
114
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
115 pal.setColor(QPalette::Window, darkGray);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
116 pal.setColor(QPalette::WindowText, Qt::white);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
117 pal.setColor(QPalette::Base, black);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
118 pal.setColor(QPalette::AlternateBase, darkGray);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
119 pal.setColor(QPalette::ToolTipBase, blue);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
120 pal.setColor(QPalette::ToolTipText, Qt::white);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
121 pal.setColor(QPalette::Text, Qt::white);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
122 pal.setColor(QPalette::Button, darkGray);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
123 pal.setColor(QPalette::ButtonText, Qt::white);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
124 pal.setColor(QPalette::Link, blue);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
125 pal.setColor(QPalette::Highlight, blue);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
126 pal.setColor(QPalette::HighlightedText, Qt::black);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
127
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
128 pal.setColor(QPalette::Active, QPalette::Button, gray.darker());
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
129 pal.setColor(QPalette::Disabled, QPalette::ButtonText, gray);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
130 pal.setColor(QPalette::Disabled, QPalette::WindowText, gray);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
131 pal.setColor(QPalette::Disabled, QPalette::Text, gray);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
132 pal.setColor(QPalette::Disabled, QPalette::Light, darkGray);
305
91ac90a34003 core/time: remove Duration class, use regular functions instead
Paper <paper@paper.us.eu.org>
parents: 291
diff changeset
133
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
134 qApp->setPalette(pal);
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
135
229
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 183
diff changeset
136 #ifdef WIN32
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
137 qApp->setStyleSheet([] {
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
138 QFile f(":/dark.qss");
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
139 if (!f.exists())
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
140 return QStringLiteral("");
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
141 f.open(QFile::ReadOnly | QFile::Text);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
142 QTextStream ts(&f);
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
143 return ts.readAll();
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
144 }());
229
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 183
diff changeset
145 #endif
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
146 break;
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
147 }
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
148 default:
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
149 /* this sucks */
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
150 QPalette pal(QApplication::style()->standardPalette());
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
151 #ifdef WIN32 /* fuck you Qt 6 */
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
152 pal.setColor(QPalette::Window, QColor(0xF0, 0xF0, 0xF0));
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
153 #endif
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
154 qApp->setPalette(pal);
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
155
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
156 qApp->setStyleSheet("");
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
157 break;
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
158 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
159 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
160
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
161 void ThemeManager::SetTheme(Theme theme)
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
162 {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
163 switch (theme) {
393
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
164 case Theme::Light:
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
165 SetToLightTheme();
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
166 break;
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
167 case Theme::Dark:
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
168 SetToDarkTheme();
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
169 break;
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
170 case Theme::Default:
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
171 if (GetCurrentOSTheme() == Theme::Light)
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
172 SetToLightTheme();
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
173 else
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
174 SetToDarkTheme();
963047512d34 *: clang-format
Paper <paper@tflc.us>
parents: 369
diff changeset
175 break;
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
176 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
177 this->theme = theme;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
178 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
179
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
180 void ThemeManager::RepaintCurrentTheme()
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 351
diff changeset
181 {
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
182 SetTheme(theme);
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
183 }
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
184
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
185 } // namespace Theme