diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs
index 4b5a2e7c..af1e63d1 100644
--- a/Ink Canvas/MainWindow.xaml.cs
+++ b/Ink Canvas/MainWindow.xaml.cs
@@ -2817,7 +2817,7 @@ namespace Ink_Canvas
if (isOpeningOrHidingSettingsPane) return;
HideSubPanels();
{
- var settingsWindow = new Windows.SettingsViews2.SettingsWindow2();
+ var settingsWindow = new Windows.SettingsViews.SettingsWindow();
settingsWindow.Owner = this;
settingsWindow.ShowDialog();
}
diff --git a/Ink Canvas/Windows/HotkeyItem.xaml b/Ink Canvas/Windows/HotkeyItem.xaml
index 0f2ff92a..3cfc5b1e 100644
--- a/Ink Canvas/Windows/HotkeyItem.xaml
+++ b/Ink Canvas/Windows/HotkeyItem.xaml
@@ -1,66 +1,70 @@
-
-
-
+ mc:Ignorable="d"
+ d:DesignHeight="60"
+ d:DesignWidth="600">
+
+
+
-
-
-
+
+
+
-
-
-
+
+
-
-
-
+
+
-
-
+ VerticalAlignment="Center"
+ Style="{DynamicResource PrimaryButtonStyle}"
+ Padding="12,4"
+ Click="BtnSetHotkey_Click" />
-
\ No newline at end of file
+
diff --git a/Ink Canvas/Windows/HotkeyItem.xaml.cs b/Ink Canvas/Windows/HotkeyItem.xaml.cs
index 47bce516..7cbd2856 100644
--- a/Ink Canvas/Windows/HotkeyItem.xaml.cs
+++ b/Ink Canvas/Windows/HotkeyItem.xaml.cs
@@ -11,6 +11,16 @@ namespace Ink_Canvas.Windows
///
public partial class HotkeyItem : UserControl
{
+ private static readonly SolidColorBrush HotkeyValueForeground = CreateFrozenBrush(0xFA, 0xFA, 0xFA);
+ private static readonly SolidColorBrush HotkeyPlaceholderForeground = CreateFrozenBrush(0xA1, 0xA1, 0xAA);
+
+ private static SolidColorBrush CreateFrozenBrush(byte r, byte g, byte b)
+ {
+ var brush = new SolidColorBrush(Color.FromRgb(r, g, b));
+ brush.Freeze();
+ return brush;
+ }
+
#region Events
///
/// 快捷键变更事件
@@ -80,13 +90,13 @@ namespace Ink_Canvas.Windows
if (_currentKey == Key.None)
{
CurrentHotkeyTextBlock.Text = "未设置";
- CurrentHotkeyTextBlock.Foreground = Brushes.Gray;
+ CurrentHotkeyTextBlock.Foreground = HotkeyPlaceholderForeground;
}
else
{
var modifiersText = _currentModifiers == ModifierKeys.None ? "" : $"{_currentModifiers}+";
CurrentHotkeyTextBlock.Text = $"{modifiersText}{_currentKey}";
- CurrentHotkeyTextBlock.Foreground = Brushes.Black;
+ CurrentHotkeyTextBlock.Foreground = HotkeyValueForeground;
}
}
@@ -106,7 +116,7 @@ namespace Ink_Canvas.Windows
private void StopHotkeyCapture()
{
BtnSetHotkey.Content = "设置";
- BtnSetHotkey.Background = Brushes.DodgerBlue;
+ BtnSetHotkey.ClearValue(Button.BackgroundProperty);
// 移除键盘事件处理器
KeyDown -= HotkeyItem_KeyDown;
diff --git a/Ink Canvas/Windows/HotkeySettingsWindow.xaml b/Ink Canvas/Windows/HotkeySettingsWindow.xaml
index 249de7b1..18d6518e 100644
--- a/Ink Canvas/Windows/HotkeySettingsWindow.xaml
+++ b/Ink Canvas/Windows/HotkeySettingsWindow.xaml
@@ -6,216 +6,370 @@
xmlns:local="clr-namespace:Ink_Canvas.Windows"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
- ui:ThemeManager.RequestedTheme="Light"
- Background="#F9F9F9"
- AllowsTransparency="True"
- mc:Ignorable="d"
- WindowStyle="None"
+ mc:Ignorable="d"
+ Title="快捷键设置"
+ Height="600"
+ Width="800"
WindowStartupLocation="CenterScreen"
ResizeMode="CanResize"
- Title="快捷键设置"
- Height="600"
- Width="800">
-
+ FontFamily="Microsoft YaHei UI"
+ ui:ThemeManager.IsThemeAware="True"
+ ui:TitleBar.ExtendViewIntoTitleBar="True"
+ ui:WindowHelper.SystemBackdropType="Mica"
+ ui:WindowHelper.UseModernWindowStyle="True"
+ ui:TitleBar.Height="48">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/Ink Canvas/Windows/HotkeySettingsWindow.xaml.cs b/Ink Canvas/Windows/HotkeySettingsWindow.xaml.cs
index e0af19bc..e59528d5 100644
--- a/Ink Canvas/Windows/HotkeySettingsWindow.xaml.cs
+++ b/Ink Canvas/Windows/HotkeySettingsWindow.xaml.cs
@@ -541,11 +541,6 @@ namespace Ink_Canvas.Windows
#endregion
#region Event Handlers
- private void BtnClose_Click(object sender, RoutedEventArgs e)
- {
- Close();
- }
-
///
/// 标题栏拖拽事件
///
diff --git a/Ink Canvas/Windows/SettingsViews2/MainWindowSettingsHelper.cs b/Ink Canvas/Windows/SettingsViews/MainWindowSettingsHelper.cs
similarity index 99%
rename from Ink Canvas/Windows/SettingsViews2/MainWindowSettingsHelper.cs
rename to Ink Canvas/Windows/SettingsViews/MainWindowSettingsHelper.cs
index a05b5f0d..214454bc 100644
--- a/Ink Canvas/Windows/SettingsViews2/MainWindowSettingsHelper.cs
+++ b/Ink Canvas/Windows/SettingsViews/MainWindowSettingsHelper.cs
@@ -7,7 +7,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using Media = System.Windows.Media;
-namespace Ink_Canvas.Windows.SettingsViews2
+namespace Ink_Canvas.Windows.SettingsViews
{
public static class MainWindowSettingsHelper
{
@@ -331,7 +331,7 @@ namespace Ink_Canvas.Windows.SettingsViews2
// 查找所有打开的设置窗口
foreach (Window window in Application.Current.Windows)
{
- if (window.GetType().Name == "SettingsWindow2")
+ if (window.GetType().Name == "SettingsWindow")
{
// 同步所有面板(保守策略)
SyncAllPanels(window);
@@ -456,8 +456,8 @@ namespace Ink_Canvas.Windows.SettingsViews2
// 查找所有打开的设置窗口
foreach (Window window in Application.Current.Windows)
{
- // 使用类型名称匹配,因为 SettingsWindow2 在不同的命名空间中
- if (window.GetType().Name == "SettingsWindow2")
+ // 使用类型名称匹配,因为 SettingsWindow 在不同的命名空间中
+ if (window.GetType().Name == "SettingsWindow")
{
// 同时调用 ApplyTheme 方法更新窗口本身
var applyThemeMethod = window.GetType().GetMethod("ApplyTheme",
diff --git a/Ink Canvas/Windows/SettingsViews2/Pages/AboutPage.xaml b/Ink Canvas/Windows/SettingsViews/Pages/AboutPage.xaml
similarity index 92%
rename from Ink Canvas/Windows/SettingsViews2/Pages/AboutPage.xaml
rename to Ink Canvas/Windows/SettingsViews/Pages/AboutPage.xaml
index c828997d..89458f8a 100644
--- a/Ink Canvas/Windows/SettingsViews2/Pages/AboutPage.xaml
+++ b/Ink Canvas/Windows/SettingsViews/Pages/AboutPage.xaml
@@ -1,5 +1,5 @@
/// Basic.xaml 的交互逻辑
@@ -27,8 +27,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Click(object sender, RoutedEventArgs e)
{
- // 找到SettingsWindow2窗口
- SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
+ // 找到SettingsWindow窗口
+ SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
// 调用NavigateToPage方法导航到启动页面
diff --git a/Ink Canvas/Windows/SettingsViews2/Pages/ColorsPage.xaml b/Ink Canvas/Windows/SettingsViews/Pages/ColorsPage.xaml
similarity index 91%
rename from Ink Canvas/Windows/SettingsViews2/Pages/ColorsPage.xaml
rename to Ink Canvas/Windows/SettingsViews/Pages/ColorsPage.xaml
index b048d795..70dc2588 100644
--- a/Ink Canvas/Windows/SettingsViews2/Pages/ColorsPage.xaml
+++ b/Ink Canvas/Windows/SettingsViews/Pages/ColorsPage.xaml
@@ -1,5 +1,5 @@
/// HomePage.xaml 的交互逻辑
@@ -27,8 +27,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Basic_Click(object sender, RoutedEventArgs e)
{
- // 找到SettingsWindow2窗口
- SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
+ // 找到SettingsWindow窗口
+ SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
// 调用NavigateToPage方法导航到基本设置页面
@@ -38,8 +38,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Page2_Click(object sender, RoutedEventArgs e)
{
- // 找到SettingsWindow2窗口
- SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
+ // 找到SettingsWindow窗口
+ SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
// 调用NavigateToPage方法导航到页面2
@@ -49,8 +49,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Design_Click(object sender, RoutedEventArgs e)
{
- // 找到SettingsWindow2窗口
- SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
+ // 找到SettingsWindow窗口
+ SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
// 调用NavigateToPage方法导航到设计设置页面
@@ -60,8 +60,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Appearance_Click(object sender, RoutedEventArgs e)
{
- // 找到SettingsWindow2窗口
- SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
+ // 找到SettingsWindow窗口
+ SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
// 调用NavigateToPage方法导航到外观设置页面
diff --git a/Ink Canvas/Windows/SettingsViews2/Pages/IconographyPage.xaml b/Ink Canvas/Windows/SettingsViews/Pages/IconographyPage.xaml
similarity index 96%
rename from Ink Canvas/Windows/SettingsViews2/Pages/IconographyPage.xaml
rename to Ink Canvas/Windows/SettingsViews/Pages/IconographyPage.xaml
index b2499cce..6f3fabee 100644
--- a/Ink Canvas/Windows/SettingsViews2/Pages/IconographyPage.xaml
+++ b/Ink Canvas/Windows/SettingsViews/Pages/IconographyPage.xaml
@@ -1,5 +1,5 @@
diff --git a/Ink Canvas/Windows/SettingsViews2/Pages/Page2Page.xaml.cs b/Ink Canvas/Windows/SettingsViews/Pages/Page2Page.xaml.cs
similarity index 92%
rename from Ink Canvas/Windows/SettingsViews2/Pages/Page2Page.xaml.cs
rename to Ink Canvas/Windows/SettingsViews/Pages/Page2Page.xaml.cs
index 2a49db6e..26803bb3 100644
--- a/Ink Canvas/Windows/SettingsViews2/Pages/Page2Page.xaml.cs
+++ b/Ink Canvas/Windows/SettingsViews/Pages/Page2Page.xaml.cs
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
-namespace Ink_Canvas.Windows.SettingsViews2.Pages
+namespace Ink_Canvas.Windows.SettingsViews.Pages
{
///
/// Page2.xaml 的交互逻辑
diff --git a/Ink Canvas/Windows/SettingsViews2/Pages/SettingsPage.xaml b/Ink Canvas/Windows/SettingsViews/Pages/SettingsPage.xaml
similarity index 91%
rename from Ink Canvas/Windows/SettingsViews2/Pages/SettingsPage.xaml
rename to Ink Canvas/Windows/SettingsViews/Pages/SettingsPage.xaml
index 9e0a1d74..01a9c046 100644
--- a/Ink Canvas/Windows/SettingsViews2/Pages/SettingsPage.xaml
+++ b/Ink Canvas/Windows/SettingsViews/Pages/SettingsPage.xaml
@@ -1,5 +1,5 @@
/// StartupPage.xaml 的交互逻辑
@@ -97,7 +97,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchNoFocusMode.IsOn;
// 使用Helper类更新设置并应用
- Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchNoFocusMode", newState);
+ Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchNoFocusMode", newState);
}
catch (Exception ex)
{
@@ -117,7 +117,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchWindowMode.IsOn;
// 使用Helper类更新设置并应用
- Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchWindowMode", newState);
+ Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchWindowMode", newState);
}
catch (Exception ex)
{
@@ -137,7 +137,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchAlwaysOnTop.IsOn;
// 使用Helper类更新设置并应用
- Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchAlwaysOnTop", newState);
+ Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchAlwaysOnTop", newState);
}
catch (Exception ex)
{
@@ -166,7 +166,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
MainWindow.SaveSettingsToFile();
// 通知其他面板同步状态
- Windows.SettingsViews2.MainWindowSettingsHelper.NotifySettingsPanelsSyncState("ToggleSwitchUIAccessTopMost");
+ Windows.SettingsViews.MainWindowSettingsHelper.NotifySettingsPanelsSyncState("ToggleSwitchUIAccessTopMost");
}
catch (Exception ex)
{
@@ -190,7 +190,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchRunAtStartup.IsOn;
// 使用Helper类更新设置并应用
- Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchRunAtStartup", newState);
+ Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchRunAtStartup", newState);
}
catch (Exception ex)
{
@@ -210,7 +210,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchFoldAtStartup.IsOn;
// 使用Helper类更新设置并应用
- Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchFoldAtStartup", newState);
+ Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchFoldAtStartup", newState);
}
catch (Exception ex)
{
@@ -234,7 +234,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchPPTOnlyMode.IsOn;
// 使用Helper类更新设置并应用
- Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchMode", newState);
+ Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchMode", newState);
}
catch (Exception ex)
{
diff --git a/Ink Canvas/Windows/SettingsViews2/Pages/ThemePage.xaml b/Ink Canvas/Windows/SettingsViews/Pages/ThemePage.xaml
similarity index 92%
rename from Ink Canvas/Windows/SettingsViews2/Pages/ThemePage.xaml
rename to Ink Canvas/Windows/SettingsViews/Pages/ThemePage.xaml
index 6a42b271..7ba46eab 100644
--- a/Ink Canvas/Windows/SettingsViews2/Pages/ThemePage.xaml
+++ b/Ink Canvas/Windows/SettingsViews/Pages/ThemePage.xaml
@@ -1,5 +1,5 @@
_pageTypes;
private readonly Dictionary _pages = new Dictionary();
@@ -26,7 +26,7 @@ namespace Ink_Canvas.Windows.SettingsViews2
// 标记窗口是否曾经最大化过
private bool _wasMaximized = false;
- public SettingsWindow2()
+ public SettingsWindow()
{
InitializeComponent();