diff --git a/Ink Canvas/InkCanvasForClass.csproj b/Ink Canvas/InkCanvasForClass.csproj index 1c25b961..921824a8 100644 --- a/Ink Canvas/InkCanvasForClass.csproj +++ b/Ink Canvas/InkCanvasForClass.csproj @@ -421,6 +421,7 @@ + diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index c9d0d120..93032d3e 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -9434,7 +9434,7 @@ MouseUp="TwoFingerGestureBorder_MouseUp" Background="Transparent" Orientation="Vertical" HorizontalAlignment="Center" Width="36" Margin="0"> - + /// 刷新手势按钮图标 + /// + private void RefreshGestureButtonIcon() + { + try + { + // 调用手势按钮颜色和图标更新方法,该方法会根据当前主题和手势状态设置正确的图标 + CheckEnableTwoFingerGestureBtnColorPrompt(); + } + catch (Exception) + { + } + } + /// /// 刷新其他窗口的主题 /// diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index 38b9ca94..c9bd64db 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -80,8 +80,7 @@ namespace Ink_Canvas // 多指书写模式启用时,手势功能被禁用 TwoFingerGestureSimpleStackPanel.Opacity = 0.5; TwoFingerGestureSimpleStackPanel.IsHitTestVisible = false; - EnableTwoFingerGestureBtn.Source = - new BitmapImage(new Uri("/Resources/new-icons/gesture.png", UriKind.Relative)); + EnableTwoFingerGestureBtn.Source = (BitmapImage)Application.Current.FindResource("GestureIcon"); // 根据主题设置颜色 if (Settings.Appearance.Theme == 1) // 深色主题 @@ -117,8 +116,7 @@ namespace Ink_Canvas if (hasGestureEnabled) { - EnableTwoFingerGestureBtn.Source = - new BitmapImage(new Uri("/Resources/new-icons/gesture-enabled.png", UriKind.Relative)); + EnableTwoFingerGestureBtn.Source = (BitmapImage)Application.Current.FindResource("GestureIconEnabled"); BoardGesture.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235)); BoardGestureGeometry.Brush = new SolidColorBrush(Colors.GhostWhite); @@ -130,8 +128,7 @@ namespace Ink_Canvas } else { - EnableTwoFingerGestureBtn.Source = - new BitmapImage(new Uri("/Resources/new-icons/gesture.png", UriKind.Relative)); + EnableTwoFingerGestureBtn.Source = (BitmapImage)Application.Current.FindResource("GestureIcon"); // 根据主题设置颜色 if (Settings.Appearance.Theme == 1) // 深色主题 diff --git a/Ink Canvas/Resources/Styles/Dark.xaml b/Ink Canvas/Resources/Styles/Dark.xaml index b9761ed8..a6cd8bf9 100644 --- a/Ink Canvas/Resources/Styles/Dark.xaml +++ b/Ink Canvas/Resources/Styles/Dark.xaml @@ -145,4 +145,8 @@ + + + + \ No newline at end of file diff --git a/Ink Canvas/Resources/Styles/Light.xaml b/Ink Canvas/Resources/Styles/Light.xaml index 056d21bf..8f48ff49 100644 --- a/Ink Canvas/Resources/Styles/Light.xaml +++ b/Ink Canvas/Resources/Styles/Light.xaml @@ -145,4 +145,8 @@ + + + + \ No newline at end of file