| 202 | }; |
| 203 | |
| 204 | static 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 | |
| 234 | class BorderOverlay : public QWidget { |
| 235 | public: |
no outgoing calls
no test coverage detected