From 3bde231e6d0b1c177c8c1fc4eccb6207d40aeec1 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周一, 25 12月 2023 00:59:34 +0800 Subject: [PATCH] Test on MinGW --- src/core/style/styleagent_win.cpp | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/core/style/styleagent_win.cpp b/src/core/style/styleagent_win.cpp index 663b632..c4e4e96 100644 --- a/src/core/style/styleagent_win.cpp +++ b/src/core/style/styleagent_win.cpp @@ -55,10 +55,7 @@ } }(); for (auto &&ap : std::as_const(*g_styleAgentSet())) { - if (ap->systemTheme != theme) { - ap->systemTheme = theme; - ap->notifyThemeChanged(theme); - } + ap->notifyThemeChanged(theme); } } @@ -85,7 +82,7 @@ SystemSettingEventFilter *SystemSettingEventFilter::instance = nullptr; - void StyleAgentPrivate::init() { + void StyleAgentPrivate::setupSystemThemeHook() { if (isHighContrastModeEnabled()) { systemTheme = StyleAgent::HighContrast; } else if (isDarkThemeActive()) { @@ -93,9 +90,7 @@ } else { systemTheme = StyleAgent::Light; } - } - void StyleAgentPrivate::setupSystemThemeHook() { g_styleAgentSet->insert(this); SystemSettingEventFilter::install(); } -- Gitblit v1.9.1