From 636769c0ef7452ef2122628476658abfe8aa2f88 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Sat, 30 Aug 2025 18:59:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=8F=92=E5=85=A5=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=AD=90=E9=9D=A2=E6=9D=BF=E6=8A=98=E5=8F=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index 33f42f87..439ca3a5 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -2776,17 +2776,20 @@ namespace Ink_Canvas private void InsertImageOptions_MouseUp(object sender, MouseButtonEventArgs e) { - // Hide other sub-panels first - HideSubPanelsImmediately(); - - // Show the image options panel - if (BoardImageOptionsPanel.Visibility == Visibility.Collapsed) + // Check if the image options panel is currently visible + bool isImagePanelVisible = BoardImageOptionsPanel.Visibility == Visibility.Visible; + + // Toggle the image options panel + if (isImagePanelVisible) { - AnimationsHelper.ShowWithSlideFromBottomAndFade(BoardImageOptionsPanel); + // Panel was visible, so hide it with animation + AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel); } else { - AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel); + // Panel was hidden, so hide other panels and show this one + HideSubPanelsImmediately(); + AnimationsHelper.ShowWithSlideFromBottomAndFade(BoardImageOptionsPanel); } }