annotate src/gui/theme.cc @ 118:39521c47c7a3

*: another huge megacommit, SORRY The torrents page works a lot better now Added the edit option to the anime list right click menu Vectorized currently playing files Available player and extensions are now loaded at runtime from files in (dotpath)/players.json and (dotpath)/extensions.json These paths are not permanent and will likely be moved to (dotpath)/recognition ... ... ...
author Paper <mrpapersonic@gmail.com>
date Tue, 07 Nov 2023 23:40:54 -0500
parents 2004b41d4a59
children 01d259b9c89f
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"
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3 #include <QApplication>
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 #include <QFile>
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5 #include <QDebug>
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6 #include <QTextStream>
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
7 #include <QStyleFactory>
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
8 #ifdef MACOSX
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 # include "sys/osx/dark_theme.h"
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
10 #elif WIN32
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11 # include "sys/win32/dark_theme.h"
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
12 #endif
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14 /* This is, believe it or not, one of the hardest things I've implemented :/
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
15 1. Dark mode stuff in Qt changes a lot and Qt 5 and Qt 6 are massively different
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
16 2. Some widgets, i.e. QTabWidget, QTabBar, etc., just completely IGNORE the QPalette setting
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
17 3. I don't want to use the Fusion style on every single platform
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
18 4. Windows dark mode support in Qt 6.5 (with Fusion) is completely unavoidable
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
19 (not a joke btw, it's retarded)
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
20 These three already make it really hard, but along with that, I don't even remember if
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
21 OS X dark mode support even works still; I remember the background of some of the widgets
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
22 would refuse to update for whatever reason. */
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
23
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
24 namespace Theme {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
25
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
26 Theme::Theme(Themes theme) {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
27 this->theme = theme;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
28 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
29
118
39521c47c7a3 *: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents: 108
diff changeset
30 Themes Theme::GetTheme() const {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
31 return theme;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
32 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
33
118
39521c47c7a3 *: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents: 108
diff changeset
34 bool Theme::IsInDarkTheme() const {
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
35 if (theme != Themes::OS)
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
36 return (theme == Themes::DARK);
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
37 #ifdef MACOSX
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
38 if (osx::DarkThemeAvailable())
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
39 return osx::IsInDarkTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
40 #elif defined(WIN32)
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
41 if (win32::DarkThemeAvailable())
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
42 return win32::IsInDarkTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
43 #endif
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
44 return (theme == Themes::DARK);
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
45 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
46
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
47 void Theme::SetToDarkTheme() {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
48 /* macOS >= 10.14 has its own global dark theme,
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
49 use it :) */
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
50 #ifdef MACOSX
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
51 if (osx::DarkThemeAvailable())
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
52 osx::SetToDarkTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
53 else
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
54 #elif defined(WIN32)
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
55 if (win32::DarkThemeAvailable())
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
56 win32::SetTitleBarsToBlack(true);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
57 #endif
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
58 SetStyleSheet(Themes::DARK);
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
59 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
60
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
61 void Theme::SetToLightTheme() {
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
62 #ifdef MACOSX
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
63 if (osx::DarkThemeAvailable())
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
64 osx::SetToLightTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
65 else
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
66 #elif defined(WIN32)
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
67 if (win32::DarkThemeAvailable())
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
68 win32::SetTitleBarsToBlack(false);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
69 #endif
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
70 SetStyleSheet(Themes::LIGHT);
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
71 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
72
118
39521c47c7a3 *: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents: 108
diff changeset
73 Themes Theme::GetCurrentOSTheme() const {
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 return osx::IsInDarkTheme() ? Themes::DARK : Themes::LIGHT;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
77 #elif defined(WIN32)
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
78 if (win32::DarkThemeAvailable())
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
79 return win32::IsInDarkTheme() ? Themes::DARK : Themes::LIGHT;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
80 #endif
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
81 /* Currently OS detection only supports Windows and macOS.
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
82 Please don't be shy if you're willing to port it to other OSes
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
83 (or desktop environments, or window managers) */
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
84 return Themes::LIGHT;
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 */
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
88 void Theme::SetStyleSheet(Themes theme) {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
89 switch (theme) {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
90 case Themes::DARK: {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
91 QColor darkGray(53, 53, 53);
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
92 QColor gray(128, 128, 128);
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
93 QColor black(25, 25, 25);
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
94 QColor blue(42, 130, 218);
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
95
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
96 QPalette pal(QApplication::style()->standardPalette());
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
97 pal.setColor(QPalette::Window, darkGray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
98 pal.setColor(QPalette::WindowText, Qt::white);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
99 pal.setColor(QPalette::Base, black);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
100 pal.setColor(QPalette::AlternateBase, darkGray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
101 pal.setColor(QPalette::ToolTipBase, blue);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
102 pal.setColor(QPalette::ToolTipText, Qt::white);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
103 pal.setColor(QPalette::Text, Qt::white);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
104 pal.setColor(QPalette::Button, darkGray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
105 pal.setColor(QPalette::ButtonText, Qt::white);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
106 pal.setColor(QPalette::Link, blue);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
107 pal.setColor(QPalette::Highlight, blue);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
108 pal.setColor(QPalette::HighlightedText, Qt::black);
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
109
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
110 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
111 pal.setColor(QPalette::Disabled, QPalette::ButtonText, gray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
112 pal.setColor(QPalette::Disabled, QPalette::WindowText, gray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
113 pal.setColor(QPalette::Disabled, QPalette::Text, gray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
114 pal.setColor(QPalette::Disabled, QPalette::Light, darkGray);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
115 qApp->setPalette(pal);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
116
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
117 QFile f(":dark.qss");
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
118 if (!f.exists())
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
119 break; // how?
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
120 f.open(QFile::ReadOnly | QFile::Text);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
121 QTextStream ts(&f);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
122 qApp->setStyleSheet(ts.readAll());
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
123 break;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
124 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
125 default:
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
126 QPalette pal(QApplication::style()->standardPalette());
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
127 #ifdef WIN32 /* fuck you Qt 6 */
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
128 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
129 #endif
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
130 pal.setColor(QPalette::WindowText, Qt::black);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
131 pal.setColor(QPalette::ToolTipText, Qt::black);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
132 pal.setColor(QPalette::Text, Qt::black);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
133 pal.setColor(QPalette::ButtonText, Qt::black);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
134 qApp->setPalette(pal);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
135
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
136 qApp->setStyleSheet("");
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
137 break;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
138 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
139 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
140
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
141 void Theme::SetTheme(Themes theme) {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
142 switch (theme) {
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
143 case Themes::LIGHT:
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
144 SetToLightTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
145 break;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
146 case Themes::DARK:
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
147 SetToDarkTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
148 break;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
149 case Themes::OS:
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
150 if (GetCurrentOSTheme() == Themes::LIGHT)
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
151 SetToLightTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
152 else
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
153 SetToDarkTheme();
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
154 break;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
155 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
156 this->theme = theme;
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
157 }
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
158
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
159 void Theme::RepaintCurrentTheme() {
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
160 Theme::SetTheme(theme);
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
161 }
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
162
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
163 } // namespace DarkTheme