MCPcopy Create free account
hub / github.com/IChooseYou/Reclass / applyGlobalTheme

Function applyGlobalTheme

src/main.cpp:204–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202};
203
204static void applyGlobalTheme(const rcx::Theme& theme) {
205 QPalette pal;
206 pal.setColor(QPalette::Window, theme.background);
207 pal.setColor(QPalette::WindowText, theme.text);
208 pal.setColor(QPalette::Base, theme.backgroundAlt);
209 pal.setColor(QPalette::AlternateBase, theme.surface);
210 pal.setColor(QPalette::Text, theme.text);
211 pal.setColor(QPalette::Button, theme.button);
212 pal.setColor(QPalette::ButtonText, theme.text);
213 pal.setColor(QPalette::Highlight, theme.hover);
214 pal.setColor(QPalette::HighlightedText, theme.indHoverSpan);
215 pal.setColor(QPalette::ToolTipBase, theme.backgroundAlt);
216 pal.setColor(QPalette::ToolTipText, theme.text);
217 pal.setColor(QPalette::Mid, theme.border);
218 pal.setColor(QPalette::Dark, theme.background);
219 pal.setColor(QPalette::Light, theme.textFaint);
220 pal.setColor(QPalette::Link, theme.indHoverSpan);
221
222 // Disabled group: Fusion reads these for disabled menu items, buttons, etc.
223 pal.setColor(QPalette::Disabled, QPalette::WindowText, theme.textMuted);
224 pal.setColor(QPalette::Disabled, QPalette::Text, theme.textMuted);
225 pal.setColor(QPalette::Disabled, QPalette::ButtonText, theme.textMuted);
226 pal.setColor(QPalette::Disabled, QPalette::HighlightedText, theme.textMuted);
227 pal.setColor(QPalette::Disabled, QPalette::Light, theme.background);
228
229 qApp->setPalette(pal);
230
231 qApp->setStyleSheet(QString());
232}
233
234class BorderOverlay : public QWidget {
235public:

Callers 2

applyThemeMethod · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected