improve:aovidfullsreen

This commit is contained in:
2025-10-02 18:57:49 +08:00
parent f6aebb15b4
commit c135bf8fb8
2 changed files with 13 additions and 29 deletions
+13 -29
View File
@@ -1513,6 +1513,11 @@ namespace Ink_Canvas
return;
}
if (Settings.Advanced.IsEnableAvoidFullScreenHelper && BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
{
return;
}
if (MarginFromEdge == 60) MarginFromEdge = 55;
await Dispatcher.InvokeAsync(() =>
{
@@ -1583,47 +1588,26 @@ namespace Ink_Canvas
if (!PosXCaculatedWithTaskbarHeight)
{
if (Settings.Advanced.IsEnableAvoidFullScreenHelper && BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
if (toolbarHeight == 0)
{
var workingAreaHeight = Screen.FromHandle(windowHandle).WorkingArea.Height / dpiScaleY;
pos.Y = workingAreaHeight - MarginFromEdge * ViewboxFloatingBarScaleTransform.ScaleY;
pos.Y = screenHeight - MarginFromEdge * ViewboxFloatingBarScaleTransform.ScaleY;
}
else
{
// 如果任务栏高度为0(隐藏状态),则使用固定边距
if (toolbarHeight == 0)
{
pos.Y = screenHeight - MarginFromEdge * ViewboxFloatingBarScaleTransform.ScaleY;
LogHelper.WriteLogToFile($"任务栏隐藏,使用固定边距: {MarginFromEdge}");
}
else
{
pos.Y = screenHeight - MarginFromEdge * ViewboxFloatingBarScaleTransform.ScaleY;
}
pos.Y = screenHeight - MarginFromEdge * ViewboxFloatingBarScaleTransform.ScaleY;
}
}
else if (PosXCaculatedWithTaskbarHeight)
{
if (Settings.Advanced.IsEnableAvoidFullScreenHelper && BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
if (toolbarHeight == 0)
{
var workingAreaHeight = Screen.FromHandle(windowHandle).WorkingArea.Height / dpiScaleY;
pos.Y = workingAreaHeight - ViewboxFloatingBar.ActualHeight * ViewboxFloatingBarScaleTransform.ScaleY -
ViewboxFloatingBarScaleTransform.ScaleY * 3;
pos.Y = screenHeight - ViewboxFloatingBar.ActualHeight * ViewboxFloatingBarScaleTransform.ScaleY -
3 * ViewboxFloatingBarScaleTransform.ScaleY;
}
else
{
// 如果任务栏高度为0(隐藏状态),则使用固定高度
if (toolbarHeight == 0)
{
pos.Y = screenHeight - ViewboxFloatingBar.ActualHeight * ViewboxFloatingBarScaleTransform.ScaleY -
3 * ViewboxFloatingBarScaleTransform.ScaleY;
LogHelper.WriteLogToFile($"任务栏隐藏,使用固定高度: {ViewboxFloatingBar.ActualHeight}");
}
else
{
pos.Y = screenHeight - ViewboxFloatingBar.ActualHeight * ViewboxFloatingBarScaleTransform.ScaleY -
toolbarHeight - ViewboxFloatingBarScaleTransform.ScaleY * 3;
}
pos.Y = screenHeight - ViewboxFloatingBar.ActualHeight * ViewboxFloatingBarScaleTransform.ScaleY -
toolbarHeight - ViewboxFloatingBarScaleTransform.ScaleY * 3;
}
}