improve:主题

This commit is contained in:
2025-10-04 17:12:14 +08:00
parent d497e07187
commit b03b8da586
+29
View File
@@ -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;
}
/// <summary>
/// 根据主题自动切换浮动栏图标
/// </summary>
private void AutoSwitchFloatingBarIconForTheme(string theme)
{
try
{
if (theme == "Light")
{
Settings.Appearance.FloatingBarImg = 0;
}
else if (theme == "Dark")
{
Settings.Appearance.FloatingBarImg = 3;
}
// 更新浮动栏图标
UpdateFloatingBarIcon();
}
catch (Exception)
{
}
}
}
}