improve:aovidfullsreen

This commit is contained in:
2025-10-02 18:54:09 +08:00
parent 2b4f88becd
commit f6aebb15b4
2 changed files with 29 additions and 12 deletions
+29 -12
View File
@@ -1583,30 +1583,47 @@ namespace Ink_Canvas
if (!PosXCaculatedWithTaskbarHeight)
{
// 如果任务栏高度为0(隐藏状态),则使用固定边距
if (toolbarHeight == 0)
if (Settings.Advanced.IsEnableAvoidFullScreenHelper && BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
{
pos.Y = screenHeight - MarginFromEdge * ViewboxFloatingBarScaleTransform.ScaleY;
LogHelper.WriteLogToFile($"任务栏隐藏,使用固定边距: {MarginFromEdge}");
var workingAreaHeight = Screen.FromHandle(windowHandle).WorkingArea.Height / dpiScaleY;
pos.Y = workingAreaHeight - MarginFromEdge * ViewboxFloatingBarScaleTransform.ScaleY;
}
else
{
pos.Y = screenHeight - MarginFromEdge * ViewboxFloatingBarScaleTransform.ScaleY;
// 如果任务栏高度为0(隐藏状态),则使用固定边距
if (toolbarHeight == 0)
{
pos.Y = screenHeight - MarginFromEdge * ViewboxFloatingBarScaleTransform.ScaleY;
LogHelper.WriteLogToFile($"任务栏隐藏,使用固定边距: {MarginFromEdge}");
}
else
{
pos.Y = screenHeight - MarginFromEdge * ViewboxFloatingBarScaleTransform.ScaleY;
}
}
}
else if (PosXCaculatedWithTaskbarHeight)
{
// 如果任务栏高度为0(隐藏状态),则使用固定高度
if (toolbarHeight == 0)
if (Settings.Advanced.IsEnableAvoidFullScreenHelper && BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
{
pos.Y = screenHeight - ViewboxFloatingBar.ActualHeight * ViewboxFloatingBarScaleTransform.ScaleY -
3 * ViewboxFloatingBarScaleTransform.ScaleY;
LogHelper.WriteLogToFile($"任务栏隐藏,使用固定高度: {ViewboxFloatingBar.ActualHeight}");
var workingAreaHeight = Screen.FromHandle(windowHandle).WorkingArea.Height / dpiScaleY;
pos.Y = workingAreaHeight - ViewboxFloatingBar.ActualHeight * ViewboxFloatingBarScaleTransform.ScaleY -
ViewboxFloatingBarScaleTransform.ScaleY * 3;
}
else
{
pos.Y = screenHeight - ViewboxFloatingBar.ActualHeight * ViewboxFloatingBarScaleTransform.ScaleY -
toolbarHeight - ViewboxFloatingBarScaleTransform.ScaleY * 3;
// 如果任务栏高度为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;
}
}
}