From 7306e7e862fbc7546134fb0faddde5534b56f941 Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Sat, 11 Oct 2025 02:29:48 +0200 Subject: [PATCH 1/3] Fix: #3183 --- Source/NETworkManager/StatusWindow.xaml.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Source/NETworkManager/StatusWindow.xaml.cs b/Source/NETworkManager/StatusWindow.xaml.cs index a4184ca53b..b19e7e7254 100644 --- a/Source/NETworkManager/StatusWindow.xaml.cs +++ b/Source/NETworkManager/StatusWindow.xaml.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel; +using System.Diagnostics; using System.Runtime.CompilerServices; using System.Windows.Forms; using System.Windows.Input; @@ -43,7 +44,7 @@ private void OnPropertyChanged([CallerMemberName] string propertyName = null) #endregion #region Variables - + // Set priority to make the ui smoother private readonly DispatcherTimer _dispatcherTimerClose = new(DispatcherPriority.Normal); @@ -142,16 +143,18 @@ public void ShowWindow(bool enableCloseTimer = false) // ToDo: User setting... if (Screen.PrimaryScreen != null) { - Left = Screen.PrimaryScreen.WorkingArea.Right - Width - 10; - Top = Screen.PrimaryScreen.WorkingArea.Bottom - Height - 10; + var scaleFactor = System.Windows.Media.VisualTreeHelper.GetDpi(this).DpiScaleX; + + Left = Screen.PrimaryScreen.WorkingArea.Right / scaleFactor - Width - 10; + Top = Screen.PrimaryScreen.WorkingArea.Bottom / scaleFactor - Height - 10; } // Show the window Show(); - + // Check the network connection Check(); - + // Close the window after a certain time if (enableCloseTimer) { From 09990e644f4bd888524ae884aa7a84bc7e8b6004 Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Sat, 11 Oct 2025 02:34:00 +0200 Subject: [PATCH 2/3] Docs: #3185 --- Website/docs/changelog/next-release.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Website/docs/changelog/next-release.md b/Website/docs/changelog/next-release.md index 61df56f460..b89128b314 100644 --- a/Website/docs/changelog/next-release.md +++ b/Website/docs/changelog/next-release.md @@ -34,6 +34,8 @@ Release date: **xx.xx.2025** ## Bug Fixes +- Fixed an issue where the status window was out of screen when a display scale other than 100% was set. [#3185](https://github.com/BornToBeRoot/NETworkManager/pull/3185) + **Web Console** - Fixed a crash that occurred when clearing the browser cache. [#3169](https://github.com/BornToBeRoot/NETworkManager/pull/3169) From 7f89468d9b53e71be5851b36d6da520b1f6ad13b Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Sat, 11 Oct 2025 02:40:12 +0200 Subject: [PATCH 3/3] Update StatusWindow.xaml.cs --- Source/NETworkManager/StatusWindow.xaml.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/NETworkManager/StatusWindow.xaml.cs b/Source/NETworkManager/StatusWindow.xaml.cs index b19e7e7254..794c48ae3f 100644 --- a/Source/NETworkManager/StatusWindow.xaml.cs +++ b/Source/NETworkManager/StatusWindow.xaml.cs @@ -1,14 +1,12 @@ -using System; +using NETworkManager.Settings; +using NETworkManager.Utilities; +using NETworkManager.Views; +using System; using System.ComponentModel; -using System.Diagnostics; using System.Runtime.CompilerServices; using System.Windows.Forms; using System.Windows.Input; using System.Windows.Threading; -using log4net; -using NETworkManager.Settings; -using NETworkManager.Utilities; -using NETworkManager.Views; namespace NETworkManager;