From feaf6c45c128fb59d0e9f9bbfe75e4e7cc472d35 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 19 Jun 2024 11:42:37 -0700 Subject: [PATCH] fix a variable name --- Flow.Launcher/MainWindow.xaml.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index ae57e7934..4fd0145db 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -360,15 +360,15 @@ namespace Flow.Launcher var ratio = screenBound / _settings.PreviousScreen; - var dpiXRatio = currentDpi / _settings.PreviousDpi; + var dpiRatio = currentDpi / _settings.PreviousDpi; - var newPosition = previousPosition * ratio * dpiXRatio; + var newPosition = previousPosition * ratio * dpiRatio; - Point2D screenPosition = (SystemParameters.VirtualScreenLeft, SystemParameters.VirtualScreenTop); + Point2D minPosition = (SystemParameters.VirtualScreenLeft, SystemParameters.VirtualScreenTop); - var maxPosition = screenPosition + screenBound - (ActualWidth, ActualHeight); + var maxPosition = minPosition + screenBound - (ActualWidth, ActualHeight); - (Left, Top) = newPosition.Clamp(screenPosition, maxPosition); + (Left, Top) = newPosition.Clamp(minPosition, maxPosition); } private Point2D GetDpi()