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