From 862374bec4e9f8d07b7ceb2db768f7ef975fde11 Mon Sep 17 00:00:00 2001 From: PrefacedCorg <1876568293@qq.com> Date: Sun, 18 Jan 2026 04:05:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dui=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow.xaml | 332 +++++++++--------- .../MainWindow_cs/MW_FloatingBarIcons.cs | 80 +---- Ink Canvas/MainWindow_cs/MW_ShapeDrawing.cs | 22 +- 3 files changed, 182 insertions(+), 252 deletions(-) diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index 80790e4d..1b70c42a 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -4726,7 +4726,7 @@ BorderThickness="1,1,0,1" BorderBrush="{DynamicResource BoardFloatBarBorderBrush}" MouseUp="BtnWhiteBoardSwitchPrevious_Click" CornerRadius="5,0,0,5" Background="{DynamicResource BoardFloatBarBackground}" - Opacity="0.95"> + Opacity="1"> @@ -4750,7 +4750,7 @@ + Opacity="1"> + Background="{DynamicResource BoardFloatBarBackground}" Opacity="1"> @@ -4842,7 +4842,7 @@ + Opacity="1"> @@ -4902,156 +4902,158 @@ HorizontalAlignment="Center" FontSize="12" /> - - + + - - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + + Opacity="1"> @@ -5106,7 +5108,7 @@ + MouseUp="PenIcon_Click" Background="{DynamicResource BoardFloatBarBackground}" Opacity="1"> @@ -5141,7 +5143,7 @@ + MouseUp="BoardEraserIcon_Click" Background="{DynamicResource BoardFloatBarBackground}" Opacity="1"> @@ -6234,7 +6236,7 @@ MouseDown="Border_MouseDown" Visibility="Collapsed" MouseUp="BoardEraserIconByStrokes_Click" Background="{DynamicResource BoardFloatBarBackground}" - Opacity="0.85"> + Opacity="1"> + MouseUp="ImageDrawShape_MouseUp" Background="{DynamicResource BoardFloatBarBackground}" Opacity="1"> @@ -6271,7 +6273,7 @@ @@ -6418,7 +6420,7 @@ + MouseUp="InsertImageOptions_MouseUp" Background="{DynamicResource BoardFloatBarBackground}" Opacity="1"> @@ -6439,7 +6441,7 @@ - + @@ -6448,12 +6450,12 @@ - + - + @@ -6522,7 +6524,7 @@ - + @@ -6540,7 +6542,7 @@ - + @@ -6564,7 +6566,7 @@ @@ -6817,7 +6819,7 @@ @@ -6853,7 +6855,7 @@ + Opacity="1"> @@ -6879,7 +6881,7 @@ BorderThickness="1,1,0,1" BorderBrush="{DynamicResource BoardFloatBarBorderBrush}" MouseUp="BtnWhiteBoardSwitchPrevious_Click" CornerRadius="5,0,0,5" Background="{DynamicResource BoardFloatBarBackground}" - Opacity="0.95"> + Opacity="1"> @@ -6903,7 +6905,7 @@ + Opacity="1"> + Background="{DynamicResource BoardFloatBarBackground}" Opacity="1"> diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index b081fd38..3540acbc 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -40,31 +40,12 @@ namespace Ink_Canvas { if (TwoFingerGestureBorder.Visibility == Visibility.Visible) { - AnimationsHelper.HideWithSlideAndFade(EraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(PenPalette); - AnimationsHelper.HideWithSlideAndFade(BoardPenPalette); - AnimationsHelper.HideWithSlideAndFade(BorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardBorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardEraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); AnimationsHelper.HideWithSlideAndFade(TwoFingerGestureBorder); AnimationsHelper.HideWithSlideAndFade(BoardTwoFingerGestureBorder); } else { - AnimationsHelper.HideWithSlideAndFade(EraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(PenPalette); - AnimationsHelper.HideWithSlideAndFade(BoardPenPalette); - AnimationsHelper.HideWithSlideAndFade(BorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardBorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardEraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); + HideSubPanels(); AnimationsHelper.ShowWithSlideFromBottomAndFade(TwoFingerGestureBorder); AnimationsHelper.ShowWithSlideFromBottomAndFade(BoardTwoFingerGestureBorder); } @@ -285,9 +266,16 @@ namespace Ink_Canvas BoardBorderLeftPageListView.Visibility = Visibility.Collapsed; BoardBorderRightPageListView.Visibility = Visibility.Collapsed; BoardImageOptionsPanel.Visibility = Visibility.Collapsed; + TwoFingerGestureBorder.Visibility = Visibility.Collapsed; + BoardTwoFingerGestureBorder.Visibility = Visibility.Collapsed; // 添加隐藏图形工具的二级菜单面板 BorderDrawShape.Visibility = Visibility.Collapsed; BoardBorderDrawShape.Visibility = Visibility.Collapsed; + + if (LogicalTreeHelper.FindLogicalNode(this, "BackgroundPalette") is Border bgPalette) + { + bgPalette.Visibility = Visibility.Collapsed; + } } /// @@ -361,6 +349,8 @@ namespace Ink_Canvas AnimationsHelper.HideWithSlideAndFade(BoardBorderLeftPageListView); AnimationsHelper.HideWithSlideAndFade(BoardBorderRightPageListView); AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel); + AnimationsHelper.HideWithSlideAndFade(TwoFingerGestureBorder); + AnimationsHelper.HideWithSlideAndFade(BoardTwoFingerGestureBorder); // 隐藏背景设置面板 if (LogicalTreeHelper.FindLogicalNode(this, "BackgroundPalette") is Border bgPalette) @@ -1567,37 +1557,16 @@ namespace Ink_Canvas if (BorderTools.Visibility == Visibility.Visible) { - AnimationsHelper.HideWithSlideAndFade(EraserSizePanel); AnimationsHelper.HideWithSlideAndFade(BorderTools); AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(PenPalette); - AnimationsHelper.HideWithSlideAndFade(BoardPenPalette); - AnimationsHelper.HideWithSlideAndFade(BorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardBorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardEraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(TwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardTwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel); } else { - AnimationsHelper.HideWithSlideAndFade(EraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(PenPalette); - AnimationsHelper.HideWithSlideAndFade(BoardPenPalette); - AnimationsHelper.HideWithSlideAndFade(BorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardBorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardEraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(TwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardTwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel); + HideSubPanels(); AnimationsHelper.ShowWithSlideFromBottomAndFade(BorderTools); AnimationsHelper.ShowWithSlideFromBottomAndFade(BoardBorderTools); } - + if (sender == ToolsFloatingBarBtn) { lastBorderMouseDownObject = null; @@ -2257,33 +2226,12 @@ namespace Ink_Canvas if (PenPalette.Visibility == Visibility.Visible) { - AnimationsHelper.HideWithSlideAndFade(EraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); AnimationsHelper.HideWithSlideAndFade(PenPalette); AnimationsHelper.HideWithSlideAndFade(BoardPenPalette); - AnimationsHelper.HideWithSlideAndFade(BorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardBorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardEraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(TwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardTwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel); } else { - AnimationsHelper.HideWithSlideAndFade(EraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(BorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardBorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardEraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(TwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardTwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel); + HideSubPanels(); AnimationsHelper.ShowWithSlideFromBottomAndFade(PenPalette); AnimationsHelper.ShowWithSlideFromBottomAndFade(BoardPenPalette); } @@ -3416,7 +3364,7 @@ namespace Ink_Canvas else { // Panel was hidden, so hide other panels and show this one - HideSubPanelsImmediately(); + HideSubPanels(); AnimationsHelper.ShowWithSlideFromBottomAndFade(BoardImageOptionsPanel); } } diff --git a/Ink Canvas/MainWindow_cs/MW_ShapeDrawing.cs b/Ink Canvas/MainWindow_cs/MW_ShapeDrawing.cs index daff6d14..1b36e02a 100644 --- a/Ink Canvas/MainWindow_cs/MW_ShapeDrawing.cs +++ b/Ink Canvas/MainWindow_cs/MW_ShapeDrawing.cs @@ -30,32 +30,12 @@ namespace Ink_Canvas // FloatingBarIcons_MouseUp_New(sender); if (BorderDrawShape.Visibility == Visibility.Visible) { - AnimationsHelper.HideWithSlideAndFade(EraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(PenPalette); - AnimationsHelper.HideWithSlideAndFade(BoardPenPalette); AnimationsHelper.HideWithSlideAndFade(BorderDrawShape); AnimationsHelper.HideWithSlideAndFade(BoardBorderDrawShape); - AnimationsHelper.HideWithSlideAndFade(BoardEraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(TwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardTwoFingerGestureBorder); } else { - AnimationsHelper.HideWithSlideAndFade(EraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(PenPalette); - AnimationsHelper.HideWithSlideAndFade(BoardPenPalette); - AnimationsHelper.HideWithSlideAndFade(BoardEraserSizePanel); - AnimationsHelper.HideWithSlideAndFade(BorderTools); - AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); - AnimationsHelper.HideWithSlideAndFade(TwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardTwoFingerGestureBorder); - AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel); + HideSubPanels(); AnimationsHelper.ShowWithSlideFromBottomAndFade(BorderDrawShape); AnimationsHelper.ShowWithSlideFromBottomAndFade(BoardBorderDrawShape); }