annotate src/gui/theme.cc @ 327:b5d6c27c308f

anime: refactor Anime::SeriesSeason to Season class ToLocalString has also been altered to take in both season and year because lots of locales actually treat formatting seasons differently! most notably is Russian which adds a suffix at the end to notate seasons(??)
author Paper <paper@paper.us.eu.org>
date Thu, 13 Jun 2024 01:49:18 -0400
parents 91ac90a34003
children c844f8bb87ce
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #include "core/config.h"
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 #include "core/session.h"
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
3 #include "gui/theme.h"
102
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>
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
7 #include <QStyleFactory>
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
8 #include <QTextStream>
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
9 #include <QStyle>
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
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
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)
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
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
ff0061e75f0f theme: add OS detection with glib
Paper <mrpapersonic@gmail.com>
parents: 230
diff changeset
16 # ifdef GLIB
ff0061e75f0f theme: add OS detection with glib
Paper <mrpapersonic@gmail.com>
parents: 230
diff changeset
17 # include "sys/glib/dark_theme.h"
ff0061e75f0f theme: add OS detection with glib
Paper <mrpapersonic@gmail.com>
parents: 230
diff changeset
18 # endif
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
19 #endif
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
20
229
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 183
diff changeset
21 /* 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
22 * 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
23 * 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
24 * 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
25 * 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
26 */
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
27
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
28 namespace Theme {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
29
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
30 ThemeManager::ThemeManager(Theme theme) {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
31 this->theme = theme;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
32 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
33
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
34 Theme ThemeManager::GetTheme() const {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
35 return theme;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
36 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
37
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
38 bool ThemeManager::IsInDarkTheme() const {
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
39 switch (theme) {
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
40 case Theme::Default:
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
41 #ifdef MACOSX
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
42 if (osx::DarkThemeAvailable())
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
43 return osx::IsInDarkTheme();
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
44 #elif defined(WIN32)
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
45 if (win32::DarkThemeAvailable())
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
46 return win32::IsInDarkTheme();
232
ff0061e75f0f theme: add OS detection with glib
Paper <mrpapersonic@gmail.com>
parents: 230
diff changeset
47 #else
ff0061e75f0f theme: add OS detection with glib
Paper <mrpapersonic@gmail.com>
parents: 230
diff changeset
48 # ifdef GLIB
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
49 return glib::IsInDarkTheme();
232
ff0061e75f0f theme: add OS detection with glib
Paper <mrpapersonic@gmail.com>
parents: 230
diff changeset
50 # endif
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
51 #endif
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
52 default: break;
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
53 }
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
54 return (theme == Theme::Dark);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
55 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
56
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
57 void ThemeManager::SetToDarkTheme() {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
58 /* macOS >= 10.14 has its own global dark theme,
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
59 use it :) */
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
60 #ifdef MACOSX
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
61 if (osx::DarkThemeAvailable())
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
62 osx::SetToDarkTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
63 else
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
64 #elif defined(WIN32)
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
65 if (win32::DarkThemeAvailable())
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
66 win32::SetTitleBarsToBlack(true);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
67 #endif
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
68 SetStyleSheet(Theme::Dark);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
69 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
70
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
71 void ThemeManager::SetToLightTheme() {
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
72 #ifdef MACOSX
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
73 if (osx::DarkThemeAvailable())
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
74 osx::SetToLightTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
75 else
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
76 #elif defined(WIN32)
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
77 if (win32::DarkThemeAvailable())
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
78 win32::SetTitleBarsToBlack(false);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
79 #endif
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
80 SetStyleSheet(Theme::Light);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
81 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
82
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
83 Theme ThemeManager::GetCurrentOSTheme() const {
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
84 return IsInDarkTheme() ? Theme::Dark : Theme::Light;
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
85 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
86
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
87 /* this function is private, and should stay that way */
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
88 void ThemeManager::SetStyleSheet(Theme theme) {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
89 switch (theme) {
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
90 case Theme::Dark: {
230
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
91 const QColor darkGray(53, 53, 53);
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
92 const QColor gray(128, 128, 128);
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
93 const QColor black(25, 25, 25);
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
94 const QColor blue(42, 130, 218);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
95
305
91ac90a34003 core/time: remove Duration class, use regular functions instead
Paper <paper@paper.us.eu.org>
parents: 291
diff changeset
96 QPalette pal;
91ac90a34003 core/time: remove Duration class, use regular functions instead
Paper <paper@paper.us.eu.org>
parents: 291
diff changeset
97
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
98 pal.setColor(QPalette::Window, darkGray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
99 pal.setColor(QPalette::WindowText, Qt::white);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
100 pal.setColor(QPalette::Base, black);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
101 pal.setColor(QPalette::AlternateBase, darkGray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
102 pal.setColor(QPalette::ToolTipBase, blue);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
103 pal.setColor(QPalette::ToolTipText, Qt::white);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
104 pal.setColor(QPalette::Text, Qt::white);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
105 pal.setColor(QPalette::Button, darkGray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
106 pal.setColor(QPalette::ButtonText, Qt::white);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
107 pal.setColor(QPalette::Link, blue);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
108 pal.setColor(QPalette::Highlight, blue);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
109 pal.setColor(QPalette::HighlightedText, Qt::black);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
110
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
111 pal.setColor(QPalette::Active, QPalette::Button, gray.darker());
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
112 pal.setColor(QPalette::Disabled, QPalette::ButtonText, gray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
113 pal.setColor(QPalette::Disabled, QPalette::WindowText, gray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
114 pal.setColor(QPalette::Disabled, QPalette::Text, gray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
115 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
116
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
117 qApp->setPalette(pal);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
118
229
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 183
diff changeset
119 #ifdef WIN32
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
120 qApp->setStyleSheet([] {
230
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
121 QFile f(":/dark.qss");
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
122 if (!f.exists())
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
123 return QStringLiteral("");
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
124 f.open(QFile::ReadOnly | QFile::Text);
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
125 QTextStream ts(&f);
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
126 return ts.readAll();
2f5a9247e501 torrents: implement download button
Paper <paper@paper.us.eu.org>
parents: 229
diff changeset
127 }());
229
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 183
diff changeset
128 #endif
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
129 break;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
130 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
131 default:
305
91ac90a34003 core/time: remove Duration class, use regular functions instead
Paper <paper@paper.us.eu.org>
parents: 291
diff changeset
132 /* this sucks */
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
133 QPalette pal(QApplication::style()->standardPalette());
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
134 #ifdef WIN32 /* fuck you Qt 6 */
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
135 pal.setColor(QPalette::Window, QColor(0xF0, 0xF0, 0xF0));
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
136 #endif
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
137 qApp->setPalette(pal);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
138
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
139 qApp->setStyleSheet("");
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
140 break;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
141 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
142 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
143
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
144 void ThemeManager::SetTheme(Theme theme) {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
145 switch (theme) {
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
146 case Theme::Light: SetToLightTheme(); break;
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
147 case Theme::Dark: SetToDarkTheme(); break;
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
148 case Theme::Default:
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
149 if (GetCurrentOSTheme() == Theme::Light)
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
150 SetToLightTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
151 else
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
152 SetToDarkTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
153 break;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
154 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
155 this->theme = theme;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
156 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
157
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
158 void ThemeManager::RepaintCurrentTheme() {
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
159 SetTheme(theme);
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
160 }
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
161
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
162 } // namespace Theme