improve:截图及浮动栏

This commit is contained in:
2025-08-31 09:59:49 +08:00
parent 9bb00489fe
commit fa7f3d44e4
5 changed files with 50 additions and 22 deletions
+8 -4
View File
@@ -269,10 +269,14 @@ namespace Ink_Canvas
if (dopsc[3] == '2' && !isDisplayingOrHidingBlackboard) AnimationsHelper.ShowWithFadeIn(RightSidePanelForPPTNavigation);
}
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
ViewboxFloatingBarMarginAnimation(60);
else
ViewboxFloatingBarMarginAnimation(100, true);
// 新增:只在屏幕模式下显示浮动栏
if (currentMode == 0)
{
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
ViewboxFloatingBarMarginAnimation(60);
else
ViewboxFloatingBarMarginAnimation(100, true);
}
SidePannelMarginAnimation(-50, !unfoldFloatingBarByUser);
});
@@ -1298,6 +1298,12 @@ namespace Ink_Canvas
public async void ViewboxFloatingBarMarginAnimation(int MarginFromEdge,
bool PosXCaculatedWithTaskbarHeight = false)
{
// 新增:在白板模式下不执行浮动栏动画
if (currentMode == 1)
{
return;
}
if (MarginFromEdge == 60) MarginFromEdge = 55;
await Dispatcher.InvokeAsync(() =>
{
@@ -1417,6 +1423,12 @@ namespace Ink_Canvas
public async void PureViewboxFloatingBarMarginAnimationInDesktopMode()
{
// 新增:在白板模式下不执行浮动栏动画
if (currentMode == 1)
{
return;
}
await Dispatcher.InvokeAsync(() =>
{
ViewboxFloatingBar.Visibility = Visibility.Visible;
@@ -1493,6 +1505,12 @@ namespace Ink_Canvas
public async void PureViewboxFloatingBarMarginAnimationInPPTMode()
{
// 新增:在白板模式下不执行浮动栏动画
if (currentMode == 1)
{
return;
}
await Dispatcher.InvokeAsync(() =>
{
ViewboxFloatingBar.Visibility = Visibility.Visible;
+12 -9
View File
@@ -197,11 +197,14 @@ namespace Ink_Canvas
val > 0.5 && val < 1.25 ? val : val <= 0.5 ? 0.5 : val >= 1.25 ? 1.25 : 1;
ViewboxFloatingBarScaleTransform.ScaleY =
val > 0.5 && val < 1.25 ? val : val <= 0.5 ? 0.5 : val >= 1.25 ? 1.25 : 1;
// auto align
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
ViewboxFloatingBarMarginAnimation(60);
else
ViewboxFloatingBarMarginAnimation(100, true);
// auto align - 新增:只在屏幕模式下重新计算浮动栏位置
if (currentMode == 0)
{
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
ViewboxFloatingBarMarginAnimation(60);
else
ViewboxFloatingBarMarginAnimation(100, true);
}
}
private void ViewboxFloatingBarOpacityValueSlider_ValueChanged(object sender, RoutedEventArgs e)
@@ -2687,14 +2690,14 @@ namespace Ink_Canvas
await Task.Delay(100);
// 获取当前选中的模式并重新设置高光位置
string currentMode = GetCurrentSelectedMode();
if (!string.IsNullOrEmpty(currentMode))
string selectedToolMode = GetCurrentSelectedMode();
if (!string.IsNullOrEmpty(selectedToolMode))
{
SetFloatingBarHighlightPosition(currentMode);
SetFloatingBarHighlightPosition(selectedToolMode);
}
// 重新计算浮动栏位置,因为按钮可见性变化会影响浮动栏宽度
if (!isFloatingBarFolded)
if (!isFloatingBarFolded && currentMode == 0) // 新增:只在屏幕模式下重新计算浮动栏位置
{
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
{