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