| | |
| | | } |
| | | }(); |
| | | for (auto &&ap : std::as_const(*g_styleAgentSet())) { |
| | | if (ap->systemTheme != theme) { |
| | | ap->systemTheme = theme; |
| | | ap->notifyThemeChanged(theme); |
| | | } |
| | | ap->notifyThemeChanged(theme); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | SystemSettingEventFilter *SystemSettingEventFilter::instance = nullptr; |
| | | |
| | | void StyleAgentPrivate::init() { |
| | | void StyleAgentPrivate::setupSystemThemeHook() { |
| | | if (isHighContrastModeEnabled()) { |
| | | systemTheme = StyleAgent::HighContrast; |
| | | } else if (isDarkThemeActive()) { |
| | |
| | | } else { |
| | | systemTheme = StyleAgent::Light; |
| | | } |
| | | } |
| | | |
| | | void StyleAgentPrivate::setupSystemThemeHook() { |
| | | g_styleAgentSet->insert(this); |
| | | SystemSettingEventFilter::install(); |
| | | } |