improve:自动收纳

This commit is contained in:
2026-01-17 16:50:37 +08:00
parent 7f154ba1db
commit 84167bbcfc
2 changed files with 35 additions and 15 deletions
+2
View File
@@ -63,6 +63,8 @@ namespace Ink_Canvas
foldFloatingBarByUser = true; foldFloatingBarByUser = true;
unfoldFloatingBarByUser = false; unfoldFloatingBarByUser = false;
if (isFloatingBarFolded) return;
if (isFloatingBarChangingHideMode) return; if (isFloatingBarChangingHideMode) return;
await Dispatcher.InvokeAsync(() => await Dispatcher.InvokeAsync(() =>
+18
View File
@@ -920,6 +920,8 @@ namespace Ink_Canvas
await Task.Delay(100); await Task.Delay(100);
await Application.Current.Dispatcher.InvokeAsync(() => await Application.Current.Dispatcher.InvokeAsync(() =>
{
if (!isFloatingBarFolded)
{ {
PureViewboxFloatingBarMarginAnimationInDesktopMode(); PureViewboxFloatingBarMarginAnimationInDesktopMode();
if (Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode) if (Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode)
@@ -927,11 +929,15 @@ namespace Ink_Canvas
Task.Delay(350).ContinueWith(_ => Task.Delay(350).ContinueWith(_ =>
{ {
Application.Current.Dispatcher.Invoke(() => Application.Current.Dispatcher.Invoke(() =>
{
if (!isFloatingBarFolded)
{ {
ViewboxFloatingBarMarginAnimation(-60); ViewboxFloatingBarMarginAnimation(-60);
}
}); });
}); });
} }
}
}); });
} }
catch (Exception ex) catch (Exception ex)
@@ -1647,13 +1653,19 @@ namespace Ink_Canvas
SetCurrentToolMode(InkCanvasEditingMode.None); SetCurrentToolMode(InkCanvasEditingMode.None);
await Task.Delay(150); await Task.Delay(150);
if (!isFloatingBarFolded)
{
PureViewboxFloatingBarMarginAnimationInDesktopMode(); PureViewboxFloatingBarMarginAnimationInDesktopMode();
if (Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode) if (Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode)
{ {
await Task.Delay(350); await Task.Delay(350);
if (!isFloatingBarFolded)
{
ViewboxFloatingBarMarginAnimation(-60); ViewboxFloatingBarMarginAnimation(-60);
} }
} }
}
}
catch (Exception ex) catch (Exception ex)
{ {
LogHelper.WriteLogToFile($"结束PPT放映操作异常: {ex}", LogHelper.LogType.Error); LogHelper.WriteLogToFile($"结束PPT放映操作异常: {ex}", LogHelper.LogType.Error);
@@ -1669,14 +1681,20 @@ namespace Ink_Canvas
await HandleManualSlideShowEnd(); await HandleManualSlideShowEnd();
await Task.Delay(150); await Task.Delay(150);
if (!isFloatingBarFolded)
{
PureViewboxFloatingBarMarginAnimationInDesktopMode(); PureViewboxFloatingBarMarginAnimationInDesktopMode();
if (Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode) if (Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode)
{ {
await Task.Delay(350); await Task.Delay(350);
if (!isFloatingBarFolded)
{
ViewboxFloatingBarMarginAnimation(-60); ViewboxFloatingBarMarginAnimation(-60);
} }
} }
} }
}
}
/// <summary> /// <summary>
/// 手动处理PPT放映结束时的自动收纳 /// 手动处理PPT放映结束时的自动收纳