From 1571d7b43228a0ed4347f681a16b2b23defccda9 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周三, 27 12月 2023 03:52:03 +0800 Subject: [PATCH] Add doxygen documentations --- src/core/style/styleagent_win.cpp | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/core/style/styleagent_win.cpp b/src/core/style/styleagent_win.cpp index 663b632..6b77012 100644 --- a/src/core/style/styleagent_win.cpp +++ b/src/core/style/styleagent_win.cpp @@ -30,9 +30,7 @@ return true; case WM_SETTINGCHANGE: { - if (!msg->wParam && msg->lParam && - std::wcscmp(reinterpret_cast<LPCWSTR>(msg->lParam), L"ImmersiveColorSet") == - 0) { + if (isImmersiveColorSetChange(msg->wParam, msg->lParam)) { return true; } break; @@ -55,10 +53,7 @@ } }(); for (auto &&ap : std::as_const(*g_styleAgentSet())) { - if (ap->systemTheme != theme) { - ap->systemTheme = theme; - ap->notifyThemeChanged(theme); - } + ap->notifyThemeChanged(theme); } } @@ -85,7 +80,7 @@ SystemSettingEventFilter *SystemSettingEventFilter::instance = nullptr; - void StyleAgentPrivate::init() { + void StyleAgentPrivate::setupSystemThemeHook() { if (isHighContrastModeEnabled()) { systemTheme = StyleAgent::HighContrast; } else if (isDarkThemeActive()) { @@ -93,9 +88,7 @@ } else { systemTheme = StyleAgent::Light; } - } - void StyleAgentPrivate::setupSystemThemeHook() { g_styleAgentSet->insert(this); SystemSettingEventFilter::install(); } -- Gitblit v1.9.1