From f6aebb15b46f8a80b68689025dee8efec3c19e84 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Thu, 2 Oct 2025 18:54:09 +0800 Subject: [PATCH] improve:aovidfullsreen --- .../MainWindow_cs/MW_FloatingBarIcons.cs | 41 +++++++++++++----- ...vasForClass.csproj.AssemblyReference.cache | Bin 38181 -> 38044 bytes 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index 455ea027..cea36e19 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -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; + } } } diff --git a/Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache b/Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache index 57d842b8b7d92d5308ee26301638a87ff9085d80..c8c2dfbd497b829755ee6211820ad2e2d43c9d13 100644 GIT binary patch delta 23 fcmZ3wifPVDCJr`6Lk0#0#>B~nPN5rP?WX_$OSlGi delta 70 zcmbQUl4B~nPN5rP?War*kO`k`FUd8TkDE=&SuZ6ghmjGefZ>7T XjqeIqIY4T;%1rbO^o$LR4J{b}mk1Gb