fix:插入图片子面板折叠问题

This commit is contained in:
2025-08-30 18:59:32 +08:00
parent 7beb2a3cc5
commit 636769c0ef
@@ -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);
}
}