fix:PPT状态浮动栏位置异常

This commit is contained in:
CJK_mkp
2025-10-20 17:45:14 +08:00
committed by GitHub
parent 171cc34c91
commit 372a8a1de1
+14 -4
View File
@@ -643,7 +643,7 @@ namespace Ink_Canvas
} }
} }
private void OnPPTSlideShowBegin(SlideShowWindow wn) private async void OnPPTSlideShowBegin(SlideShowWindow wn)
{ {
try try
{ {
@@ -659,13 +659,13 @@ namespace Ink_Canvas
{ {
if (isFloatingBarFolded) if (isFloatingBarFolded)
{ {
UnFoldFloatingBar(new object()); await UnFoldFloatingBar(new object());
} }
} }
isStopInkReplay = true; isStopInkReplay = true;
Application.Current.Dispatcher.Invoke(() => await Application.Current.Dispatcher.InvokeAsync(() =>
{ {
var activePresentation = _pptManager?.GetCurrentActivePresentation(); var activePresentation = _pptManager?.GetCurrentActivePresentation();
if (activePresentation != null) if (activePresentation != null)
@@ -785,7 +785,14 @@ namespace Ink_Canvas
if (!isFloatingBarFolded) if (!isFloatingBarFolded)
{ {
ViewboxFloatingBarMarginAnimation(60); new Thread(() =>
{
Thread.Sleep(100);
Application.Current.Dispatcher.Invoke(() =>
{
ViewboxFloatingBarMarginAnimation(60);
});
}).Start();
} }
} }
catch (Exception ex) catch (Exception ex)
@@ -929,6 +936,9 @@ namespace Ink_Canvas
if (GridTransparencyFakeBackground.Background != Brushes.Transparent) if (GridTransparencyFakeBackground.Background != Brushes.Transparent)
BtnHideInkCanvas_Click(BtnHideInkCanvas, null); BtnHideInkCanvas_Click(BtnHideInkCanvas, null);
SetCurrentToolMode(InkCanvasEditingMode.None); SetCurrentToolMode(InkCanvasEditingMode.None);
UpdateCurrentToolMode("cursor");
SetFloatingBarHighlightPosition("cursor");
} }
catch (Exception ex) catch (Exception ex)
{ {