diff --git a/Source/NETworkManager/StatusWindow.xaml.cs b/Source/NETworkManager/StatusWindow.xaml.cs index a4184ca53b..794c48ae3f 100644 --- a/Source/NETworkManager/StatusWindow.xaml.cs +++ b/Source/NETworkManager/StatusWindow.xaml.cs @@ -1,13 +1,12 @@ -using System; +using NETworkManager.Settings; +using NETworkManager.Utilities; +using NETworkManager.Views; +using System; using System.ComponentModel; 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; @@ -43,7 +42,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 +141,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) { 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)