From b03b8da5862cbf96c682511ef64d4f19ef5b754d Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Sat, 4 Oct 2025 17:12:14 +0800 Subject: [PATCH] =?UTF-8?q?improve:=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow_cs/MW_AutoTheme.cs | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Ink Canvas/MainWindow_cs/MW_AutoTheme.cs b/Ink Canvas/MainWindow_cs/MW_AutoTheme.cs index adcf5cad..cd2f0c51 100644 --- a/Ink Canvas/MainWindow_cs/MW_AutoTheme.cs +++ b/Ink Canvas/MainWindow_cs/MW_AutoTheme.cs @@ -56,6 +56,8 @@ namespace Ink_Canvas // 刷新快速面板图标 RefreshQuickPanelIcons(); + + AutoSwitchFloatingBarIconForTheme("Light"); // 强制刷新UI window.InvalidateVisual(); @@ -85,6 +87,9 @@ namespace Ink_Canvas // 刷新快速面板图标 RefreshQuickPanelIcons(); + // 自动切换浮动栏图标为深色呼吸版图标 + AutoSwitchFloatingBarIconForTheme("Dark"); + // 强制刷新UI window.InvalidateVisual(); } @@ -235,5 +240,29 @@ namespace Ink_Canvas return light; } + + /// + /// 根据主题自动切换浮动栏图标 + /// + private void AutoSwitchFloatingBarIconForTheme(string theme) + { + try + { + if (theme == "Light") + { + Settings.Appearance.FloatingBarImg = 0; + } + else if (theme == "Dark") + { + Settings.Appearance.FloatingBarImg = 3; + } + + // 更新浮动栏图标 + UpdateFloatingBarIcon(); + } + catch (Exception) + { + } + } } } \ No newline at end of file