From 24cc4757b4d924158885edf36071097794ba08a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:40:45 +0000 Subject: [PATCH 01/31] Bump Microsoft.Data.Sqlite from 8.0.3 to 8.0.6 Bumps [Microsoft.Data.Sqlite](https://github.com/dotnet/efcore) from 8.0.3 to 8.0.6. - [Release notes](https://github.com/dotnet/efcore/releases) - [Commits](https://github.com/dotnet/efcore/compare/v8.0.3...v8.0.6) --- updated-dependencies: - dependency-name: Microsoft.Data.Sqlite dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Flow.Launcher.Plugin.BrowserBookmark.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj index 234afe28a..9177813f4 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -95,7 +95,7 @@ - + From 37ccf259405e4ac70c2587b1f7b3a5e8c45159ec Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 5 Jun 2024 04:53:31 +0900 Subject: [PATCH 02/31] Add Top Positioning per monitor --- Flow.Launcher/MainWindow.xaml.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 22799a63d..6c0889295 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -306,15 +306,15 @@ namespace Flow.Launcher break; case SearchWindowAligns.CenterTop: Left = HorizonCenter(screen); - Top = 10; + Top = VerticalTop(screen); break; case SearchWindowAligns.LeftTop: Left = HorizonLeft(screen); - Top = 10; + Top = VerticalTop(screen); break; case SearchWindowAligns.RightTop: Left = HorizonRight(screen); - Top = 10; + Top = VerticalTop(screen); break; case SearchWindowAligns.Custom: Left = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X + _settings.CustomWindowLeft, 0).X; @@ -727,6 +727,13 @@ namespace Flow.Launcher return left; } + public double VerticalTop(Screen screen) + { + var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y); + var top = dip1.Y +10; + return top; + } + /// /// Register up and down key /// todo: any way to put this in xaml ? From 63ce735169afe7cf871d3d2a8eb6086e49fefa9a Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 5 Jun 2024 06:42:33 +0900 Subject: [PATCH 03/31] =?UTF-8?q?When=20using=20the=20=E2=80=9Cremember=20?= =?UTF-8?q?last=20position=E2=80=9D=20setting,=20if=20the=20resolution=20o?= =?UTF-8?q?r=20dpi=20has=20changed,=20the=20position=20will=20be=20rescale?= =?UTF-8?q?d=20proportionally?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Flow.Launcher/MainWindow.xaml.cs | 33 +++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 6c0889295..87e818154 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -27,6 +27,7 @@ using DataObject = System.Windows.DataObject; using System.Windows.Media; using System.Windows.Interop; using System.Runtime.InteropServices; +using System.Drawing; namespace Flow.Launcher { @@ -48,6 +49,10 @@ namespace Flow.Launcher private MediaPlayer animationSoundWMP; private SoundPlayer animationSoundWPF; + private double _previousScreenWidth; + private double _previousScreenHeight; + private double _previousDpiX; + private double _previousDpiY; #endregion @@ -288,8 +293,31 @@ namespace Flow.Launcher }; } + private (double X, double Y) GetCurrentDpi(Screen screen) + { + using (Graphics g = Graphics.FromHwnd(IntPtr.Zero)) + { + return (g.DpiX, g.DpiY); + } + } private void InitializePosition() { + var screen = SelectedScreen(); + var currentDpi = GetCurrentDpi(screen); + double currentScreenWidth = screen.WorkingArea.Width; + double currentScreenHeight = screen.WorkingArea.Height; + + if (_previousScreenWidth != 0 && _previousScreenHeight != 0 && _previousDpiX != 0 && _previousDpiY != 0) + { + double widthRatio = currentScreenWidth / _previousScreenWidth; + double heightRatio = currentScreenHeight / _previousScreenHeight; + double dpiXRatio = currentDpi.X / _previousDpiX; + double dpiYRatio = currentDpi.Y / _previousDpiY; + + _settings.WindowLeft *= widthRatio * dpiXRatio; + _settings.WindowTop *= heightRatio * dpiYRatio; + } + if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) { Top = _settings.WindowTop; @@ -297,7 +325,6 @@ namespace Flow.Launcher } else { - var screen = SelectedScreen(); switch (_settings.SearchWindowAlign) { case SearchWindowAligns.Center: @@ -323,6 +350,10 @@ namespace Flow.Launcher } } + _previousScreenWidth = currentScreenWidth; + _previousScreenHeight = currentScreenHeight; + _previousDpiX = currentDpi.X; + _previousDpiY = currentDpi.Y; } private void UpdateNotifyIconText() From ae0ec8ecf292ee56417da240966f516028f4c88d Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 5 Jun 2024 06:51:25 +0900 Subject: [PATCH 04/31] Revert "Fix blurry situation when changed dpi in some case" This reverts commit 2869812a74160517b2cd4ba6a7436b40eaa59195. --- Flow.Launcher/app.manifest | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/app.manifest b/Flow.Launcher/app.manifest index c45508fcf..52d1c3932 100644 --- a/Flow.Launcher/app.manifest +++ b/Flow.Launcher/app.manifest @@ -49,12 +49,13 @@ DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. --> + From 45dd84a3fa39e5784d9101bde4aabd5eff7e7969 Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 5 Jun 2024 07:03:26 +0900 Subject: [PATCH 05/31] Adjust Code --- Flow.Launcher/MainWindow.xaml.cs | 96 +++++++++++++++++--------------- 1 file changed, 52 insertions(+), 44 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 87e818154..927067f93 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -307,53 +307,61 @@ namespace Flow.Launcher double currentScreenWidth = screen.WorkingArea.Width; double currentScreenHeight = screen.WorkingArea.Height; - if (_previousScreenWidth != 0 && _previousScreenHeight != 0 && _previousDpiX != 0 && _previousDpiY != 0) + if (!( + _previousScreenWidth == currentScreenWidth && + _previousScreenHeight == currentScreenHeight && + _previousDpiX == currentDpi.X && + _previousDpiY == currentDpi.Y + )) { - double widthRatio = currentScreenWidth / _previousScreenWidth; - double heightRatio = currentScreenHeight / _previousScreenHeight; - double dpiXRatio = currentDpi.X / _previousDpiX; - double dpiYRatio = currentDpi.Y / _previousDpiY; - - _settings.WindowLeft *= widthRatio * dpiXRatio; - _settings.WindowTop *= heightRatio * dpiYRatio; - } - - if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) - { - Top = _settings.WindowTop; - Left = _settings.WindowLeft; - } - else - { - switch (_settings.SearchWindowAlign) + if (_previousScreenWidth != 0 && _previousScreenHeight != 0 && _previousDpiX != 0 && _previousDpiY != 0) { - case SearchWindowAligns.Center: - Left = HorizonCenter(screen); - Top = VerticalCenter(screen); - break; - case SearchWindowAligns.CenterTop: - Left = HorizonCenter(screen); - Top = VerticalTop(screen); - break; - case SearchWindowAligns.LeftTop: - Left = HorizonLeft(screen); - Top = VerticalTop(screen); - break; - case SearchWindowAligns.RightTop: - Left = HorizonRight(screen); - Top = VerticalTop(screen); - break; - case SearchWindowAligns.Custom: - Left = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X + _settings.CustomWindowLeft, 0).X; - Top = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y + _settings.CustomWindowTop).Y; - break; - } - } + double widthRatio = currentScreenWidth / _previousScreenWidth; + double heightRatio = currentScreenHeight / _previousScreenHeight; + double dpiXRatio = currentDpi.X / _previousDpiX; + double dpiYRatio = currentDpi.Y / _previousDpiY; - _previousScreenWidth = currentScreenWidth; - _previousScreenHeight = currentScreenHeight; - _previousDpiX = currentDpi.X; - _previousDpiY = currentDpi.Y; + _settings.WindowLeft *= widthRatio * dpiXRatio; + _settings.WindowTop *= heightRatio * dpiYRatio; + } + + if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) + { + Top = _settings.WindowTop; + Left = _settings.WindowLeft; + } + else + { + switch (_settings.SearchWindowAlign) + { + case SearchWindowAligns.Center: + Left = HorizonCenter(screen); + Top = VerticalCenter(screen); + break; + case SearchWindowAligns.CenterTop: + Left = HorizonCenter(screen); + Top = VerticalTop(screen); + break; + case SearchWindowAligns.LeftTop: + Left = HorizonLeft(screen); + Top = VerticalTop(screen); + break; + case SearchWindowAligns.RightTop: + Left = HorizonRight(screen); + Top = VerticalTop(screen); + break; + case SearchWindowAligns.Custom: + Left = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X + _settings.CustomWindowLeft, 0).X; + Top = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y + _settings.CustomWindowTop).Y; + break; + } + } + + _previousScreenWidth = currentScreenWidth; + _previousScreenHeight = currentScreenHeight; + _previousDpiX = currentDpi.X; + _previousDpiY = currentDpi.Y; + } } private void UpdateNotifyIconText() From e0cdc92766b7a3602385be45911c187754ea9637 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 6 Jun 2024 06:02:26 +0900 Subject: [PATCH 06/31] Revert "Adjust Code" This reverts commit 45dd84a3fa39e5784d9101bde4aabd5eff7e7969. --- Flow.Launcher/MainWindow.xaml.cs | 96 +++++++++++++++----------------- 1 file changed, 44 insertions(+), 52 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 927067f93..87e818154 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -307,61 +307,53 @@ namespace Flow.Launcher double currentScreenWidth = screen.WorkingArea.Width; double currentScreenHeight = screen.WorkingArea.Height; - if (!( - _previousScreenWidth == currentScreenWidth && - _previousScreenHeight == currentScreenHeight && - _previousDpiX == currentDpi.X && - _previousDpiY == currentDpi.Y - )) + if (_previousScreenWidth != 0 && _previousScreenHeight != 0 && _previousDpiX != 0 && _previousDpiY != 0) { - if (_previousScreenWidth != 0 && _previousScreenHeight != 0 && _previousDpiX != 0 && _previousDpiY != 0) - { - double widthRatio = currentScreenWidth / _previousScreenWidth; - double heightRatio = currentScreenHeight / _previousScreenHeight; - double dpiXRatio = currentDpi.X / _previousDpiX; - double dpiYRatio = currentDpi.Y / _previousDpiY; + double widthRatio = currentScreenWidth / _previousScreenWidth; + double heightRatio = currentScreenHeight / _previousScreenHeight; + double dpiXRatio = currentDpi.X / _previousDpiX; + double dpiYRatio = currentDpi.Y / _previousDpiY; - _settings.WindowLeft *= widthRatio * dpiXRatio; - _settings.WindowTop *= heightRatio * dpiYRatio; - } - - if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) - { - Top = _settings.WindowTop; - Left = _settings.WindowLeft; - } - else - { - switch (_settings.SearchWindowAlign) - { - case SearchWindowAligns.Center: - Left = HorizonCenter(screen); - Top = VerticalCenter(screen); - break; - case SearchWindowAligns.CenterTop: - Left = HorizonCenter(screen); - Top = VerticalTop(screen); - break; - case SearchWindowAligns.LeftTop: - Left = HorizonLeft(screen); - Top = VerticalTop(screen); - break; - case SearchWindowAligns.RightTop: - Left = HorizonRight(screen); - Top = VerticalTop(screen); - break; - case SearchWindowAligns.Custom: - Left = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X + _settings.CustomWindowLeft, 0).X; - Top = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y + _settings.CustomWindowTop).Y; - break; - } - } - - _previousScreenWidth = currentScreenWidth; - _previousScreenHeight = currentScreenHeight; - _previousDpiX = currentDpi.X; - _previousDpiY = currentDpi.Y; + _settings.WindowLeft *= widthRatio * dpiXRatio; + _settings.WindowTop *= heightRatio * dpiYRatio; } + + if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) + { + Top = _settings.WindowTop; + Left = _settings.WindowLeft; + } + else + { + switch (_settings.SearchWindowAlign) + { + case SearchWindowAligns.Center: + Left = HorizonCenter(screen); + Top = VerticalCenter(screen); + break; + case SearchWindowAligns.CenterTop: + Left = HorizonCenter(screen); + Top = VerticalTop(screen); + break; + case SearchWindowAligns.LeftTop: + Left = HorizonLeft(screen); + Top = VerticalTop(screen); + break; + case SearchWindowAligns.RightTop: + Left = HorizonRight(screen); + Top = VerticalTop(screen); + break; + case SearchWindowAligns.Custom: + Left = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X + _settings.CustomWindowLeft, 0).X; + Top = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y + _settings.CustomWindowTop).Y; + break; + } + } + + _previousScreenWidth = currentScreenWidth; + _previousScreenHeight = currentScreenHeight; + _previousDpiX = currentDpi.X; + _previousDpiY = currentDpi.Y; } private void UpdateNotifyIconText() From 5c6f539c6ffc469b70bdfc5839d2ed2ff0fcfae3 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 6 Jun 2024 06:02:36 +0900 Subject: [PATCH 07/31] Reapply "Fix blurry situation when changed dpi in some case" This reverts commit ae0ec8ecf292ee56417da240966f516028f4c88d. --- Flow.Launcher/app.manifest | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Flow.Launcher/app.manifest b/Flow.Launcher/app.manifest index 52d1c3932..c45508fcf 100644 --- a/Flow.Launcher/app.manifest +++ b/Flow.Launcher/app.manifest @@ -49,13 +49,12 @@ DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. --> - From 4f16a1123fb2e28bf86b3bea711869a36d42f31f Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 6 Jun 2024 06:02:52 +0900 Subject: [PATCH 08/31] Revert "Fix blurry situation when changed dpi in some case" This reverts commit 2869812a74160517b2cd4ba6a7436b40eaa59195. --- Flow.Launcher/app.manifest | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/app.manifest b/Flow.Launcher/app.manifest index c45508fcf..52d1c3932 100644 --- a/Flow.Launcher/app.manifest +++ b/Flow.Launcher/app.manifest @@ -49,12 +49,13 @@ DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. --> + From d2472084a2804bd2e3795051d6e1bf28ad08b0ee Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 6 Jun 2024 06:02:55 +0900 Subject: [PATCH 09/31] =?UTF-8?q?Revert=20"When=20using=20the=20=E2=80=9Cr?= =?UTF-8?q?emember=20last=20position=E2=80=9D=20setting,=20if=20the=20reso?= =?UTF-8?q?lution=20or=20dpi=20has=20changed,=20the=20position=20will=20be?= =?UTF-8?q?=20rescaled=20proportionally"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 63ce735169afe7cf871d3d2a8eb6086e49fefa9a. --- Flow.Launcher/MainWindow.xaml.cs | 33 +------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 87e818154..6c0889295 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -27,7 +27,6 @@ using DataObject = System.Windows.DataObject; using System.Windows.Media; using System.Windows.Interop; using System.Runtime.InteropServices; -using System.Drawing; namespace Flow.Launcher { @@ -49,10 +48,6 @@ namespace Flow.Launcher private MediaPlayer animationSoundWMP; private SoundPlayer animationSoundWPF; - private double _previousScreenWidth; - private double _previousScreenHeight; - private double _previousDpiX; - private double _previousDpiY; #endregion @@ -293,31 +288,8 @@ namespace Flow.Launcher }; } - private (double X, double Y) GetCurrentDpi(Screen screen) - { - using (Graphics g = Graphics.FromHwnd(IntPtr.Zero)) - { - return (g.DpiX, g.DpiY); - } - } private void InitializePosition() { - var screen = SelectedScreen(); - var currentDpi = GetCurrentDpi(screen); - double currentScreenWidth = screen.WorkingArea.Width; - double currentScreenHeight = screen.WorkingArea.Height; - - if (_previousScreenWidth != 0 && _previousScreenHeight != 0 && _previousDpiX != 0 && _previousDpiY != 0) - { - double widthRatio = currentScreenWidth / _previousScreenWidth; - double heightRatio = currentScreenHeight / _previousScreenHeight; - double dpiXRatio = currentDpi.X / _previousDpiX; - double dpiYRatio = currentDpi.Y / _previousDpiY; - - _settings.WindowLeft *= widthRatio * dpiXRatio; - _settings.WindowTop *= heightRatio * dpiYRatio; - } - if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) { Top = _settings.WindowTop; @@ -325,6 +297,7 @@ namespace Flow.Launcher } else { + var screen = SelectedScreen(); switch (_settings.SearchWindowAlign) { case SearchWindowAligns.Center: @@ -350,10 +323,6 @@ namespace Flow.Launcher } } - _previousScreenWidth = currentScreenWidth; - _previousScreenHeight = currentScreenHeight; - _previousDpiX = currentDpi.X; - _previousDpiY = currentDpi.Y; } private void UpdateNotifyIconText() From ab40e7a2e4045772a36b6a6b6f712187e24be377 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 6 Jun 2024 07:37:13 +0900 Subject: [PATCH 10/31] Adjust logic --- .../UserSettings/Settings.cs | 4 + Flow.Launcher/MainWindow.xaml.cs | 114 +++++++++++++++++- 2 files changed, 116 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 458846665..c44e0369a 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -205,6 +205,10 @@ namespace Flow.Launcher.Infrastructure.UserSettings public double WindowLeft { get; set; } public double WindowTop { get; set; } + public double PreviousScreenWidth { get; set; } + public double PreviousScreenHeight { get; set; } + public double PreviousDpiX { get; set; } + public double PreviousDpiY { get; set; } /// /// Custom left position on selected monitor diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 6c0889295..a699eaa64 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -27,6 +27,7 @@ using DataObject = System.Windows.DataObject; using System.Windows.Media; using System.Windows.Interop; using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.Arm; namespace Flow.Launcher { @@ -292,11 +293,39 @@ namespace Flow.Launcher { if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) { - Top = _settings.WindowTop; + // Get the previous screen width, height, DPI X, and DPI Y + double previousScreenWidth = _settings.PreviousScreenWidth; + double previousScreenHeight = _settings.PreviousScreenHeight; + double previousDpiX = _settings.PreviousDpiX; + double previousDpiY = _settings.PreviousDpiY; + + // Save current screen width, height, DPI X, and DPI Y + _settings.PreviousScreenWidth = SystemParameters.VirtualScreenWidth; + _settings.PreviousScreenHeight = SystemParameters.VirtualScreenHeight; + _settings.PreviousDpiX = GetDpiX(); + _settings.PreviousDpiY = GetDpiY(); + + // If previous screen width, height, DPI X, or DPI Y are not zero + if (previousScreenWidth != 0 && previousScreenHeight != 0 && + previousDpiX != 0 && previousDpiY != 0) + { + // If previous and current screen properties are different, adjust position + if (previousScreenWidth != SystemParameters.VirtualScreenWidth || + previousScreenHeight != SystemParameters.VirtualScreenHeight || + previousDpiX != GetDpiX() || previousDpiY != GetDpiY()) + { + AdjustPositionForResolutionChange(); + return; + } + } + + // If previous screen width, height, DPI X, and DPI Y are the same, initialize with previous position Left = _settings.WindowLeft; + Top = _settings.WindowTop; } else { + // Keep the existing logic var screen = SelectedScreen(); switch (_settings.SearchWindowAlign) { @@ -322,9 +351,90 @@ namespace Flow.Launcher break; } } - } + private void AdjustPositionForResolutionChange() + { + double screenWidth = SystemParameters.VirtualScreenWidth; + double screenHeight = SystemParameters.VirtualScreenHeight; + double screenLeft = SystemParameters.VirtualScreenLeft; + double screenTop = SystemParameters.VirtualScreenTop; + double currentDpiX = GetDpiX(); + double currentDpiY = GetDpiY(); + + // Get current screen width, height, left, top, and DPI X, DPI Y + double currentScreenWidth = screenWidth; + double currentScreenHeight = screenHeight; + double currentScreenLeft = screenLeft; + double currentScreenTop = screenTop; + + // Get previous window left, top, and DPI X, DPI Y + double previousLeft = _settings.WindowLeft; + double previousTop = _settings.WindowTop; + double previousDpiX = _settings.PreviousDpiX; + double previousDpiY = _settings.PreviousDpiY; + + // Calculate ratios for width, height, DPI X, and DPI Y + double widthRatio = currentScreenWidth / _settings.PreviousScreenWidth; + double heightRatio = currentScreenHeight / _settings.PreviousScreenHeight; + double dpiXRatio = currentDpiX / previousDpiX; + double dpiYRatio = currentDpiY / previousDpiY; + + // Adjust previous position according to current resolution and DPI + double newLeft = previousLeft * widthRatio * dpiXRatio; + double newTop = previousTop * heightRatio * dpiYRatio; + + // Ensure the adjusted position is within the current screen boundaries + if (newLeft + ActualWidth > currentScreenLeft + currentScreenWidth) + { + newLeft = currentScreenLeft + currentScreenWidth - ActualWidth; + } + else if (newLeft < currentScreenLeft) + { + newLeft = currentScreenLeft; + } + + if (newTop + ActualHeight > currentScreenTop + currentScreenHeight) + { + newTop = currentScreenTop + currentScreenHeight - ActualHeight; + } + else if (newTop < currentScreenTop) + { + newTop = currentScreenTop; + } + + // Set the new position + Left = newLeft; + Top = newTop; + } + + private double GetDpiX() + { + // Get the PresentationSource for this visual + PresentationSource source = PresentationSource.FromVisual(this); + // Check if the PresentationSource and its CompositionTarget are not null + if (source != null && source.CompositionTarget != null) + { + // Get the transform matrix for the CompositionTarget + Matrix m = source.CompositionTarget.TransformToDevice; + // Calculate DPI in X direction + double dpiX = 96 * m.M11; + return dpiX; + } + return 96; //Return a default DPI of 96 if PresentationSource or CompositionTarget is null + } + + private double GetDpiY() + { + PresentationSource source = PresentationSource.FromVisual(this); + if (source != null && source.CompositionTarget != null) + { + Matrix m = source.CompositionTarget.TransformToDevice; + double dpiY = 96 * m.M22; + return dpiY; + } + return 96; + } private void UpdateNotifyIconText() { var menu = contextMenu; From 5df736267426dd5e2191e1d757895eae99ad1015 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 6 Jun 2024 08:10:40 +0900 Subject: [PATCH 11/31] - Add Logic in settingwindow --- Flow.Launcher/SettingWindow.xaml.cs | 34 ++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index de4fd1f91..99c363222 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -112,23 +112,45 @@ public partial class SettingWindow { if (_settings.SettingWindowTop == null || _settings.SettingWindowLeft == null) { - Top = WindowTop(); - Left = WindowLeft(); + SetWindowPosition(WindowTop(), WindowLeft()); } else { - Top = _settings.SettingWindowTop.Value; - Left = _settings.SettingWindowLeft.Value; + double left = _settings.SettingWindowLeft.Value; + double top = _settings.SettingWindowTop.Value; + AdjustWindowPosition(ref top, ref left); + SetWindowPosition(top, left); } WindowState = _settings.SettingWindowState; } + private void SetWindowPosition(double top, double left) + { + // Ensure window does not exceed screen boundaries + top = Math.Max(top, SystemParameters.VirtualScreenTop); + left = Math.Max(left, SystemParameters.VirtualScreenLeft); + top = Math.Min(top, SystemParameters.VirtualScreenHeight - ActualHeight); + left = Math.Min(left, SystemParameters.VirtualScreenWidth - ActualWidth); + + Top = top; + Left = left; + } + + private void AdjustWindowPosition(ref double top, ref double left) + { + // Adjust window position if it exceeds screen boundaries + top = Math.Max(top, SystemParameters.VirtualScreenTop); + left = Math.Max(left, SystemParameters.VirtualScreenLeft); + top = Math.Min(top, SystemParameters.VirtualScreenHeight - ActualHeight); + left = Math.Min(left, SystemParameters.VirtualScreenWidth - ActualWidth); + } + private double WindowLeft() { var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position); var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0); var dip2 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.Width, 0); - var left = (dip2.X - this.ActualWidth) / 2 + dip1.X; + var left = (dip2.X - ActualWidth) / 2 + dip1.X; return left; } @@ -137,7 +159,7 @@ public partial class SettingWindow var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position); var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y); var dip2 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Height); - var top = (dip2.Y - this.ActualHeight) / 2 + dip1.Y - 20; + var top = (dip2.Y - ActualHeight) / 2 + dip1.Y; return top; } From 88c6fe3acbeef0e3cbb53d9d8f1308afb5a67678 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 6 Jun 2024 09:32:46 +0900 Subject: [PATCH 12/31] Adjust Code --- Flow.Launcher/MainWindow.xaml.cs | 111 ++++++++++--------------------- 1 file changed, 34 insertions(+), 77 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index a699eaa64..b9b82909d 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -293,39 +293,31 @@ namespace Flow.Launcher { if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) { - // Get the previous screen width, height, DPI X, and DPI Y double previousScreenWidth = _settings.PreviousScreenWidth; double previousScreenHeight = _settings.PreviousScreenHeight; - double previousDpiX = _settings.PreviousDpiX; - double previousDpiY = _settings.PreviousDpiY; + double previousDpiX, previousDpiY; + GetDpi(out previousDpiX, out previousDpiY); - // Save current screen width, height, DPI X, and DPI Y _settings.PreviousScreenWidth = SystemParameters.VirtualScreenWidth; _settings.PreviousScreenHeight = SystemParameters.VirtualScreenHeight; - _settings.PreviousDpiX = GetDpiX(); - _settings.PreviousDpiY = GetDpiY(); + double currentDpiX, currentDpiY; + GetDpi(out currentDpiX, out currentDpiY); - // If previous screen width, height, DPI X, or DPI Y are not zero if (previousScreenWidth != 0 && previousScreenHeight != 0 && - previousDpiX != 0 && previousDpiY != 0) + previousDpiX != 0 && previousDpiY != 0 && + (previousScreenWidth != SystemParameters.VirtualScreenWidth || + previousScreenHeight != SystemParameters.VirtualScreenHeight || + previousDpiX != currentDpiX || previousDpiY != currentDpiY)) { - // If previous and current screen properties are different, adjust position - if (previousScreenWidth != SystemParameters.VirtualScreenWidth || - previousScreenHeight != SystemParameters.VirtualScreenHeight || - previousDpiX != GetDpiX() || previousDpiY != GetDpiY()) - { - AdjustPositionForResolutionChange(); - return; - } + AdjustPositionForResolutionChange(); + return; } - // If previous screen width, height, DPI X, and DPI Y are the same, initialize with previous position Left = _settings.WindowLeft; Top = _settings.WindowTop; } else { - // Keep the existing logic var screen = SelectedScreen(); switch (_settings.SearchWindowAlign) { @@ -346,8 +338,10 @@ namespace Flow.Launcher Top = VerticalTop(screen); break; case SearchWindowAligns.Custom: - Left = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X + _settings.CustomWindowLeft, 0).X; - Top = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y + _settings.CustomWindowTop).Y; + var customLeft = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X + _settings.CustomWindowLeft, 0); + var customTop = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y + _settings.CustomWindowTop); + Left = customLeft.X; + Top = customTop.Y; break; } } @@ -357,83 +351,46 @@ namespace Flow.Launcher { double screenWidth = SystemParameters.VirtualScreenWidth; double screenHeight = SystemParameters.VirtualScreenHeight; - double screenLeft = SystemParameters.VirtualScreenLeft; - double screenTop = SystemParameters.VirtualScreenTop; - double currentDpiX = GetDpiX(); - double currentDpiY = GetDpiY(); + double currentDpiX, currentDpiY; + GetDpi(out currentDpiX, out currentDpiY); - // Get current screen width, height, left, top, and DPI X, DPI Y - double currentScreenWidth = screenWidth; - double currentScreenHeight = screenHeight; - double currentScreenLeft = screenLeft; - double currentScreenTop = screenTop; - - // Get previous window left, top, and DPI X, DPI Y double previousLeft = _settings.WindowLeft; double previousTop = _settings.WindowTop; - double previousDpiX = _settings.PreviousDpiX; - double previousDpiY = _settings.PreviousDpiY; + double previousDpiX, previousDpiY; + GetDpi(out previousDpiX, out previousDpiY); - // Calculate ratios for width, height, DPI X, and DPI Y - double widthRatio = currentScreenWidth / _settings.PreviousScreenWidth; - double heightRatio = currentScreenHeight / _settings.PreviousScreenHeight; + double widthRatio = screenWidth / _settings.PreviousScreenWidth; + double heightRatio = screenHeight / _settings.PreviousScreenHeight; double dpiXRatio = currentDpiX / previousDpiX; double dpiYRatio = currentDpiY / previousDpiY; - // Adjust previous position according to current resolution and DPI double newLeft = previousLeft * widthRatio * dpiXRatio; double newTop = previousTop * heightRatio * dpiYRatio; - // Ensure the adjusted position is within the current screen boundaries - if (newLeft + ActualWidth > currentScreenLeft + currentScreenWidth) - { - newLeft = currentScreenLeft + currentScreenWidth - ActualWidth; - } - else if (newLeft < currentScreenLeft) - { - newLeft = currentScreenLeft; - } + double screenLeft = SystemParameters.VirtualScreenLeft; + double screenTop = SystemParameters.VirtualScreenTop; - if (newTop + ActualHeight > currentScreenTop + currentScreenHeight) - { - newTop = currentScreenTop + currentScreenHeight - ActualHeight; - } - else if (newTop < currentScreenTop) - { - newTop = currentScreenTop; - } + double maxX = screenLeft + screenWidth - ActualWidth; + double maxY = screenTop + screenHeight - ActualHeight; - // Set the new position - Left = newLeft; - Top = newTop; + Left = Math.Max(screenLeft, Math.Min(newLeft, maxX)); + Top = Math.Max(screenTop, Math.Min(newTop, maxY)); } - private double GetDpiX() - { - // Get the PresentationSource for this visual - PresentationSource source = PresentationSource.FromVisual(this); - // Check if the PresentationSource and its CompositionTarget are not null - if (source != null && source.CompositionTarget != null) - { - // Get the transform matrix for the CompositionTarget - Matrix m = source.CompositionTarget.TransformToDevice; - // Calculate DPI in X direction - double dpiX = 96 * m.M11; - return dpiX; - } - return 96; //Return a default DPI of 96 if PresentationSource or CompositionTarget is null - } - - private double GetDpiY() + private void GetDpi(out double dpiX, out double dpiY) { PresentationSource source = PresentationSource.FromVisual(this); if (source != null && source.CompositionTarget != null) { Matrix m = source.CompositionTarget.TransformToDevice; - double dpiY = 96 * m.M22; - return dpiY; + dpiX = 96 * m.M11; + dpiY = 96 * m.M22; + } + else + { + dpiX = 96; + dpiY = 96; } - return 96; } private void UpdateNotifyIconText() { From 1bd9e8131d2a50ccd28a3600c15e0049bc34fdc8 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 6 Jun 2024 09:35:44 +0900 Subject: [PATCH 13/31] Fix app manifest --- Flow.Launcher/app.manifest | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/app.manifest b/Flow.Launcher/app.manifest index 52d1c3932..b6944273a 100644 --- a/Flow.Launcher/app.manifest +++ b/Flow.Launcher/app.manifest @@ -49,13 +49,12 @@ DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. --> - From e863d998ab4698dbdf73bb813f59d543e620e223 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 6 Jun 2024 09:36:25 +0900 Subject: [PATCH 14/31] Adjust Typo --- Flow.Launcher/app.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/app.manifest b/Flow.Launcher/app.manifest index b6944273a..c45508fcf 100644 --- a/Flow.Launcher/app.manifest +++ b/Flow.Launcher/app.manifest @@ -49,7 +49,7 @@ DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. --> - + true PerMonitorV2, PerMonitor From ce100c46278eb3d94fae35ba0b34a7ab9171f633 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 19 Jun 2024 11:38:34 -0700 Subject: [PATCH 15/31] refactor code with Point2D.cs --- .../UserSettings/Point2D.cs | 46 +++++ .../UserSettings/Settings.cs | 10 +- Flow.Launcher/MainWindow.xaml.cs | 177 ++++++++---------- Flow.Launcher/ViewModel/MainViewModel.cs | 6 +- 4 files changed, 133 insertions(+), 106 deletions(-) create mode 100644 Flow.Launcher.Infrastructure/UserSettings/Point2D.cs diff --git a/Flow.Launcher.Infrastructure/UserSettings/Point2D.cs b/Flow.Launcher.Infrastructure/UserSettings/Point2D.cs new file mode 100644 index 000000000..4c47ba6c0 --- /dev/null +++ b/Flow.Launcher.Infrastructure/UserSettings/Point2D.cs @@ -0,0 +1,46 @@ +using System; + +namespace Flow.Launcher.Infrastructure.UserSettings; + +public record struct Point2D(double X, double Y) +{ + public static implicit operator Point2D((double X, double Y) point) + { + return new Point2D(point.X, point.Y); + } + + public static Point2D operator +(Point2D point1, Point2D point2) + { + return new Point2D(point1.X + point2.X, point1.Y + point2.Y); + } + + public static Point2D operator -(Point2D point1, Point2D point2) + { + return new Point2D(point1.X - point2.X, point1.Y - point2.Y); + } + + public static Point2D operator *(Point2D point, double scalar) + { + return new Point2D(point.X * scalar, point.Y * scalar); + } + + public static Point2D operator /(Point2D point, double scalar) + { + return new Point2D(point.X / scalar, point.Y / scalar); + } + + public static Point2D operator /(Point2D point1, Point2D point2) + { + return new Point2D(point1.X / point2.X, point1.Y / point2.Y); + } + + public static Point2D operator *(Point2D point1, Point2D point2) + { + return new Point2D(point1.X * point2.X, point1.Y * point2.Y); + } + + public Point2D Clamp(Point2D min, Point2D max) + { + return new Point2D(Math.Clamp(X, min.X, max.X), Math.Clamp(Y, min.Y, max.Y)); + } +} diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index c44e0369a..c216efad2 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -203,12 +203,10 @@ namespace Flow.Launcher.Infrastructure.UserSettings public bool AutoUpdates { get; set; } = false; - public double WindowLeft { get; set; } - public double WindowTop { get; set; } - public double PreviousScreenWidth { get; set; } - public double PreviousScreenHeight { get; set; } - public double PreviousDpiX { get; set; } - public double PreviousDpiY { get; set; } + + public Point2D WindowPosition { get; set; } + public Point2D PreviousScreen { get; set; } + public Point2D PreviousDpi { get; set; } /// /// Custom left position on selected monitor diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index b9b82909d..3516d7e69 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -73,11 +73,7 @@ namespace Flow.Launcher }; } - DispatcherTimer timer = new DispatcherTimer - { - Interval = new TimeSpan(0, 0, 0, 0, 500), - IsEnabled = false - }; + DispatcherTimer timer = new DispatcherTimer { Interval = new TimeSpan(0, 0, 0, 0, 500), IsEnabled = false }; public MainWindow() { @@ -88,6 +84,7 @@ namespace Flow.Launcher private const int WM_EXITSIZEMOVE = 0x0232; private int _initialWidth; private int _initialHeight; + private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { if (msg == WM_ENTERSIZEMOVE) @@ -96,18 +93,22 @@ namespace Flow.Launcher _initialHeight = (int)Height; handled = true; } + if (msg == WM_EXITSIZEMOVE) { - if ( _initialHeight != (int)Height) + if (_initialHeight != (int)Height) { OnResizeEnd(); } + if (_initialWidth != (int)Width) { FlowMainWindow.SizeToContent = SizeToContent.Height; } + handled = true; } + return IntPtr.Zero; } @@ -132,6 +133,7 @@ namespace Flow.Launcher _settings.MaxResultsToShow = Convert.ToInt32(Math.Truncate(itemCount)); } } + FlowMainWindow.SizeToContent = SizeToContent.Height; _viewModel.MainWindowWidth = Width; } @@ -176,6 +178,7 @@ namespace Flow.Launcher private void OnInitialized(object sender, EventArgs e) { } + private void OnLoaded(object sender, RoutedEventArgs _) { // MouseEventHandler @@ -207,6 +210,7 @@ namespace Flow.Launcher { SoundPlay(); } + UpdatePosition(); PreviewReset(); Activate(); @@ -218,7 +222,8 @@ namespace Flow.Launcher _viewModel.LastQuerySelected = true; } - if (_viewModel.ProgressBarVisibility == Visibility.Visible && isProgressBarStoryboardPaused) + if (_viewModel.ProgressBarVisibility == Visibility.Visible && + isProgressBarStoryboardPaused) { _progressBarStoryboard.Begin(ProgressBar, true); isProgressBarStoryboardPaused = false; @@ -259,9 +264,12 @@ namespace Flow.Launcher MoveQueryTextToEnd(); _viewModel.QueryTextCursorMovedToEnd = false; } + break; case nameof(MainViewModel.GameModeStatus): - _notifyIcon.Icon = _viewModel.GameModeStatus ? Properties.Resources.gamemode : Properties.Resources.app; + _notifyIcon.Icon = _viewModel.GameModeStatus + ? Properties.Resources.gamemode + : Properties.Resources.app; break; } }; @@ -279,11 +287,8 @@ namespace Flow.Launcher case nameof(Settings.Hotkey): UpdateNotifyIconText(); break; - case nameof(Settings.WindowLeft): - Left = _settings.WindowLeft; - break; - case nameof(Settings.WindowTop): - Top = _settings.WindowTop; + case nameof(Settings.WindowPosition): + (Left, Top) = _settings.WindowPosition; break; } }; @@ -293,28 +298,24 @@ namespace Flow.Launcher { if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) { - double previousScreenWidth = _settings.PreviousScreenWidth; - double previousScreenHeight = _settings.PreviousScreenHeight; - double previousDpiX, previousDpiY; - GetDpi(out previousDpiX, out previousDpiY); + var previousScreen = _settings.PreviousScreen; - _settings.PreviousScreenWidth = SystemParameters.VirtualScreenWidth; - _settings.PreviousScreenHeight = SystemParameters.VirtualScreenHeight; - double currentDpiX, currentDpiY; - GetDpi(out currentDpiX, out currentDpiY); + var previousDpi = _settings.PreviousDpi; - if (previousScreenWidth != 0 && previousScreenHeight != 0 && - previousDpiX != 0 && previousDpiY != 0 && - (previousScreenWidth != SystemParameters.VirtualScreenWidth || - previousScreenHeight != SystemParameters.VirtualScreenHeight || - previousDpiX != currentDpiX || previousDpiY != currentDpiY)) + _settings.PreviousScreen = (SystemParameters.VirtualScreenWidth, SystemParameters.VirtualScreenHeight); + + var currentDpi = GetDpi(); + + if (previousScreen != default || + previousDpi != default || + (previousScreen != (SystemParameters.VirtualScreenWidth, SystemParameters.VirtualScreenHeight) || + previousDpi != currentDpi)) { AdjustPositionForResolutionChange(); return; } - Left = _settings.WindowLeft; - Top = _settings.WindowTop; + (Left, Top) = _settings.WindowPosition; } else { @@ -338,8 +339,10 @@ namespace Flow.Launcher Top = VerticalTop(screen); break; case SearchWindowAligns.Custom: - var customLeft = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X + _settings.CustomWindowLeft, 0); - var customTop = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y + _settings.CustomWindowTop); + var customLeft = WindowsInteropHelper.TransformPixelsToDIP(this, + screen.WorkingArea.X + _settings.CustomWindowLeft, 0); + var customTop = WindowsInteropHelper.TransformPixelsToDIP(this, 0, + screen.WorkingArea.Y + _settings.CustomWindowTop); Left = customLeft.X; Top = customTop.Y; break; @@ -349,58 +352,48 @@ namespace Flow.Launcher private void AdjustPositionForResolutionChange() { - double screenWidth = SystemParameters.VirtualScreenWidth; - double screenHeight = SystemParameters.VirtualScreenHeight; - double currentDpiX, currentDpiY; - GetDpi(out currentDpiX, out currentDpiY); + Point2D screenBound = (SystemParameters.VirtualScreenWidth, SystemParameters.VirtualScreenHeight); - double previousLeft = _settings.WindowLeft; - double previousTop = _settings.WindowTop; - double previousDpiX, previousDpiY; - GetDpi(out previousDpiX, out previousDpiY); + var currentDpi = GetDpi(); - double widthRatio = screenWidth / _settings.PreviousScreenWidth; - double heightRatio = screenHeight / _settings.PreviousScreenHeight; - double dpiXRatio = currentDpiX / previousDpiX; - double dpiYRatio = currentDpiY / previousDpiY; + var previousPosition = _settings.WindowPosition; - double newLeft = previousLeft * widthRatio * dpiXRatio; - double newTop = previousTop * heightRatio * dpiYRatio; + var ratio = screenBound / _settings.PreviousScreen; - double screenLeft = SystemParameters.VirtualScreenLeft; - double screenTop = SystemParameters.VirtualScreenTop; + var dpiXRatio = currentDpi / _settings.PreviousDpi; - double maxX = screenLeft + screenWidth - ActualWidth; - double maxY = screenTop + screenHeight - ActualHeight; + var newPosition = previousPosition * ratio * dpiXRatio; - Left = Math.Max(screenLeft, Math.Min(newLeft, maxX)); - Top = Math.Max(screenTop, Math.Min(newTop, maxY)); + Point2D screenPosition = (SystemParameters.VirtualScreenLeft, SystemParameters.VirtualScreenTop); + + var maxPosition = screenPosition + screenBound - (ActualWidth, ActualHeight); + + (Left, Top) = newPosition.Clamp(screenPosition, maxPosition); } - private void GetDpi(out double dpiX, out double dpiY) + private Point2D GetDpi() { PresentationSource source = PresentationSource.FromVisual(this); - if (source != null && source.CompositionTarget != null) + Point2D point = (96, 96); + if (source is { CompositionTarget: not null }) { Matrix m = source.CompositionTarget.TransformToDevice; - dpiX = 96 * m.M11; - dpiY = 96 * m.M22; - } - else - { - dpiX = 96; - dpiY = 96; + point.X = 96 * m.M11; + point.Y = 96 * m.M22; } + + return point; } + private void UpdateNotifyIconText() { var menu = contextMenu; - ((MenuItem)menu.Items[0]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")"; + ((MenuItem)menu.Items[0]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + + " (" + _settings.Hotkey + ")"; ((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("GameMode"); ((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("PositionReset"); ((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"); ((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"); - } private void InitializeNotifyIcon() @@ -412,50 +405,34 @@ namespace Flow.Launcher Visible = !_settings.HideNotifyIcon }; - var openIcon = new FontIcon - { - Glyph = "\ue71e" - }; + var openIcon = new FontIcon { Glyph = "\ue71e" }; var open = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")", + Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + + _settings.Hotkey + ")", Icon = openIcon }; - var gamemodeIcon = new FontIcon - { - Glyph = "\ue7fc" - }; + var gamemodeIcon = new FontIcon { Glyph = "\ue7fc" }; var gamemode = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("GameMode"), - Icon = gamemodeIcon - }; - var positionresetIcon = new FontIcon - { - Glyph = "\ue73f" + Header = InternationalizationManager.Instance.GetTranslation("GameMode"), Icon = gamemodeIcon }; + var positionresetIcon = new FontIcon { Glyph = "\ue73f" }; var positionreset = new MenuItem { Header = InternationalizationManager.Instance.GetTranslation("PositionReset"), Icon = positionresetIcon }; - var settingsIcon = new FontIcon - { - Glyph = "\ue713" - }; + var settingsIcon = new FontIcon { Glyph = "\ue713" }; var settings = new MenuItem { Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"), Icon = settingsIcon }; - var exitIcon = new FontIcon - { - Glyph = "\ue7e8" - }; + var exitIcon = new FontIcon { Glyph = "\ue7e8" }; var exit = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"), - Icon = exitIcon + Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"), Icon = exitIcon }; open.Click += (o, e) => _viewModel.ToggleFlowLauncher(); @@ -488,6 +465,7 @@ namespace Flow.Launcher { _ = SetForegroundWindow(hwndSource.Handle); } + contextMenu.Focus(); break; } @@ -521,8 +499,10 @@ namespace Flow.Launcher private void InitProgressbarAnimation() { - var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 100, new Duration(new TimeSpan(0, 0, 0, 0, 1600))); - var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 0, new Duration(new TimeSpan(0, 0, 0, 0, 1600))); + var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 100, + new Duration(new TimeSpan(0, 0, 0, 0, 1600))); + var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 0, + new Duration(new TimeSpan(0, 0, 0, 0, 1600))); Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)")); Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)")); _progressBarStoryboard.Children.Add(da); @@ -624,14 +604,14 @@ namespace Flow.Launcher iconsb.Children.Add(IconOpacity); windowsb.Completed += (_, _) => _animating = false; - _settings.WindowLeft = Left; - _settings.WindowTop = Top; + _settings.WindowPosition = (Left, Top); isArrowKeyPressed = false; if (QueryTextBox.Text.Length == 0) { clocksb.Begin(ClockPanel); } + iconsb.Begin(SearchIcon); windowsb.Begin(FlowMainWindow); } @@ -685,8 +665,7 @@ namespace Flow.Launcher private async void OnDeactivated(object sender, EventArgs e) { - _settings.WindowLeft = Left; - _settings.WindowTop = Top; + _settings.WindowPosition = (Left, Top); //This condition stops extra hide call when animator is on, // which causes the toggling to occasional hide instead of show. if (_viewModel.MainWindowVisibilityStatus) @@ -717,8 +696,7 @@ namespace Flow.Launcher return; if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) { - _settings.WindowLeft = Left; - _settings.WindowTop = Top; + _settings.WindowPosition = (Left, Top); } } @@ -738,7 +716,7 @@ namespace Flow.Launcher public Screen SelectedScreen() { Screen screen = null; - switch(_settings.SearchWindowScreen) + switch (_settings.SearchWindowScreen) { case SearchWindowScreens.Cursor: screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position); @@ -760,6 +738,7 @@ namespace Flow.Launcher screen = Screen.AllScreens[0]; break; } + return screen ?? Screen.AllScreens[0]; } @@ -797,7 +776,7 @@ namespace Flow.Launcher public double VerticalTop(Screen screen) { var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y); - var top = dip1.Y +10; + var top = dip1.Y + 10; return top; } @@ -836,6 +815,7 @@ namespace Flow.Launcher _viewModel.LoadContextMenuCommand.Execute(null); e.Handled = true; } + break; case Key.Left: if (!_viewModel.SelectedIsFromQueryResults() && QueryTextBox.CaretIndex == 0) @@ -843,6 +823,7 @@ namespace Flow.Launcher _viewModel.EscCommand.Execute(null); e.Handled = true; } + break; case Key.Back: if (specialKeyState.CtrlPressed) @@ -861,12 +842,13 @@ namespace Flow.Launcher } } } + break; default: break; - } } + private void OnKeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Up || e.Key == Key.Down) @@ -882,6 +864,7 @@ namespace Flow.Launcher e.Handled = true; // Ignore Mouse Hover when press Arrowkeys } } + public void PreviewReset() { _viewModel.ResetPreview(); diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index a793ceaa5..406d2af58 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -543,20 +543,20 @@ namespace Flow.Launcher.ViewModel private void IncreaseWidth() { Settings.WindowSize += 100; - Settings.WindowLeft -= 50; + Settings.WindowPosition -= (50, 0); OnPropertyChanged(nameof(MainWindowWidth)); } [RelayCommand] private void DecreaseWidth() { - if (MainWindowWidth - 100 < 400 || Settings.WindowSize == 400) + if (MainWindowWidth - 100 < 400 || Math.Abs(Settings.WindowSize - 400) < 0.01) { Settings.WindowSize = 400; } else { - Settings.WindowLeft += 50; + Settings.WindowPosition += (50, 0); Settings.WindowSize -= 100; } From feaf6c45c128fb59d0e9f9bbfe75e4e7cc472d35 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 19 Jun 2024 11:42:37 -0700 Subject: [PATCH 16/31] 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() From 70a24e077459309a62b19481741b29d5509c96e3 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 19 Jun 2024 11:43:23 -0700 Subject: [PATCH 17/31] remove unused intrinsic --- Flow.Launcher/MainWindow.xaml.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 4fd0145db..9e09c3470 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -27,7 +27,6 @@ using DataObject = System.Windows.DataObject; using System.Windows.Media; using System.Windows.Interop; using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.Arm; namespace Flow.Launcher { From 58caa493bcec26ef74e5b93653b94111ca1356fb Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 19 Jun 2024 11:45:23 -0700 Subject: [PATCH 18/31] fix logic --- Flow.Launcher/MainWindow.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 9e09c3470..4027e7698 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -305,8 +305,8 @@ namespace Flow.Launcher var currentDpi = GetDpi(); - if (previousScreen != default || - previousDpi != default || + if (previousScreen == default || + previousDpi == default || (previousScreen != (SystemParameters.VirtualScreenWidth, SystemParameters.VirtualScreenHeight) || previousDpi != currentDpi)) { From 6bf23c939db096e79a6da603612ddef534261627 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 23:07:12 +0000 Subject: [PATCH 19/31] Bump BitFaster.Caching from 2.5.0 to 2.5.1 Bumps [BitFaster.Caching](https://github.com/bitfaster/BitFaster.Caching) from 2.5.0 to 2.5.1. - [Release notes](https://github.com/bitfaster/BitFaster.Caching/releases) - [Commits](https://github.com/bitfaster/BitFaster.Caching/compare/v2.5.0...v2.5.1) --- updated-dependencies: - dependency-name: BitFaster.Caching dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Flow.Launcher.Infrastructure.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index 7d6448c43..688b40c83 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -49,7 +49,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From d167813e66f38f440f65f419b1a0d234f35f6619 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 23:08:21 +0000 Subject: [PATCH 20/31] Bump Microsoft.NET.Test.Sdk from 17.9.0 to 17.10.0 Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.9.0 to 17.10.0. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.9.0...v17.10.0) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Flow.Launcher.Test/Flow.Launcher.Test.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index fd967de4a..9f2b64134 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -54,7 +54,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file From 83830472cbae4c2b1181b4a038c2127360e6d00c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 23:09:41 +0000 Subject: [PATCH 21/31] Bump FSharp.Core from 7.0.401 to 8.0.300 Bumps [FSharp.Core](https://github.com/dotnet/fsharp) from 7.0.401 to 8.0.300. - [Release notes](https://github.com/dotnet/fsharp/releases) - [Changelog](https://github.com/dotnet/fsharp/blob/main/release-notes.md) - [Commits](https://github.com/dotnet/fsharp/commits) --- updated-dependencies: - dependency-name: FSharp.Core dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Flow.Launcher.Core/Flow.Launcher.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index fe2cb7e58..6d97e1c52 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -54,7 +54,7 @@ - + From 44d8af33f2a210d488077f5df36ff3e33e6b1d7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:50:26 +0000 Subject: [PATCH 22/31] Bump Meziantou.Framework.Win32.Jobs from 3.2.1 to 3.4.0 Bumps [Meziantou.Framework.Win32.Jobs](https://github.com/meziantou/Meziantou.Framework) from 3.2.1 to 3.4.0. - [Commits](https://github.com/meziantou/Meziantou.Framework/commits) --- updated-dependencies: - dependency-name: Meziantou.Framework.Win32.Jobs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Flow.Launcher.Core/Flow.Launcher.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index 6d97e1c52..851541fc2 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -55,7 +55,7 @@ - + From 224b364a5ac4fb12d151deb41cfe9bafb94aeb8e Mon Sep 17 00:00:00 2001 From: Yusyuriv Date: Fri, 28 Jun 2024 05:56:28 +0600 Subject: [PATCH 23/31] Modify gitstream todo checks --- .cm/gitstream.cm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.cm/gitstream.cm b/.cm/gitstream.cm index c372f5a6c..eee43c969 100644 --- a/.cm/gitstream.cm +++ b/.cm/gitstream.cm @@ -32,12 +32,12 @@ automations: args: comment: | This PR is {{ changes.ratio }}% new code. - # Post a comment that request changes for a PR that contains a TODO statement. + # Post a comment notifying that the PR contains a TODO statement. review_todo_comments: if: - - {{ source.diff.files | matchDiffLines(regex=r/^[+].*(TODO)|(todo)/) | some }} + - {{ source.diff.files | matchDiffLines(regex=r/^[+].*\b(TODO|todo)\b/) | some }} run: - - action: request-changes@v1 + - action: add-comment@v1 args: comment: | This PR contains a TODO statement. Please check to see if they should be removed. @@ -76,4 +76,4 @@ changes: has: screenshot_link: {{ pr.description | includes(regex=r/!\[.*\]\(.*(jpg|svg|png|gif|psd).*\)/) }} - image_uploaded: {{ pr.description | includes(regex=r//) }} \ No newline at end of file + image_uploaded: {{ pr.description | includes(regex=r//) }} From 55cd12d5325c21b0f6f5620551be7c75a34c89d2 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 30 Jun 2024 04:38:24 +1000 Subject: [PATCH 24/31] New Crowdin updates (#2795) Updated translations --- Flow.Launcher/Languages/fr.xaml | 4 +-- Flow.Launcher/Languages/sk.xaml | 12 ++++---- Flow.Launcher/Languages/vi.xaml | 30 +++++++++---------- .../Languages/fr.xaml | 8 ++--- .../Languages/pt-pt.xaml | 8 ++--- .../Languages/vi.xaml | 28 ++++++++--------- .../Languages/vi.xaml | 8 ++--- .../Languages/vi.xaml | 4 +-- .../Properties/Resources.vi-VN.resx | 18 +++++------ 9 files changed, 60 insertions(+), 60 deletions(-) diff --git a/Flow.Launcher/Languages/fr.xaml b/Flow.Launcher/Languages/fr.xaml index a30fa0b19..65a41cbf3 100644 --- a/Flow.Launcher/Languages/fr.xaml +++ b/Flow.Launcher/Languages/fr.xaml @@ -178,8 +178,8 @@ Personnalisé Heure Date - This theme supports two(light/dark) modes. - This theme supports Blur Transparent Background. + Ce thème prend en charge deux modes (clair/sombre). + Ce thème prend en charge l'arrière-plan flou et transparent. diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index ef5fbd716..079c03e80 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -54,7 +54,7 @@ Ponechať Označiť Vymazať - Fixed Window Height + Pevná výška okna Výška okna sa nedá nastaviť ťahaním. Maximum výsledkov Túto hodnotu môžete rýchlo upraviť aj pomocou klávesových skratiek CTRL + znamienko plus (+) a CTRL + znamienko mínus (-). @@ -146,13 +146,13 @@ Spúšťanie programov ako správca alebo iný používateľ ProcessKiller Ukončenie nežiaducich procesov - Search Bar Height - Item Height + Výška vyhľadávacieho panela + Výška položky Písmo vyhľadávacieho poľa - Result Title Font - Result Subtitle Font + Písmo nadpisu výsledku + Písmo podnadpisu výsledku Resetovať - Customize + Prispôsobiť Režim okno Nepriehľadnosť Motív {0} neexistuje, použije sa predvolený motív diff --git a/Flow.Launcher/Languages/vi.xaml b/Flow.Launcher/Languages/vi.xaml index 312dbbb76..b7804381b 100644 --- a/Flow.Launcher/Languages/vi.xaml +++ b/Flow.Launcher/Languages/vi.xaml @@ -213,10 +213,10 @@ Chạy với quyền admin Refresh Search Results Dữ liệu plugin không tải - Quick Adjust Window Width - Quick Adjust Window Height - Use when require plugins to reload and update their existing data. - You can add one more hotkey for this function. + Điều chỉnh nhanh độ rộng cửa sổ + Điều chỉnh nhanh chiều cao cửa sổ + Sử dụng khi yêu cầu plugin tải lại và cập nhật dữ liệu hiện có của chúng. + Bạn có thể thêm một phím nóng nữa cho chức năng này. Phím tắt truy vấn tùy chỉnh Lối tắt truy vấn tùy chỉnh Phím tắt tích hợp @@ -283,9 +283,9 @@ Xóa tệp nhật ký Bạn có chắc chắn muốn xóa tất cả nhật ký không? Wizard - User Data Location - User settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not. - Open Folder + Vị trí dữ liệu người dùng + Thiết đặt người dùng và plugin đã cài đặt sẽ được lưu trong thư mục dữ liệu người dùng. Vị trí này có thể thay đổi tùy thuộc vào việc nó có ở chế độ di động hay không. + Mở thư mục Chọn trình quản lý tệp @@ -332,7 +332,7 @@ Tổ hợp phím plugin không hợp lệ Cập nhật Binding Hotkey - Current hotkey is unavailable. + Phím nóng hiện tại không có sẵn. This hotkey is reserved for "{0}" and can't be used. Please choose another hotkey. This hotkey is already in use by "{0}". If you press "Overwrite", it will be removed from "{0}". Press the keys you want to use for this function. @@ -429,10 +429,10 @@ Mở cửa sổ cài đặt Dữ liệu plugin không tải - Select first result - Select last result - Run current query again - Open result + Chọn kết quả đầu tiên + Chọn kết quả cuối cùng + Chạy lại truy vấn hiện tại + Mở kết quả Open result #{0} Thời Tiết @@ -445,7 +445,7 @@ Ghi chú - File Size - Created - Last Modified + Kích thước tệp + Đã tạo + Sửa đổi lần cuối diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml index ab1d1f4c9..4ff56e85e 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml @@ -151,8 +151,8 @@ Il peut être très lent sans index (qui n'est supporté que dans Everything v1.5+). - Native Context Menu - Display native context menu (experimental) - Below you can specify items you want to include in the context menu, they can be partial (e.g. 'pen wit') or complete ('Open with'). - Below you can specify items you want to exclude from context menu, they can be partial (e.g. 'pen wit') or complete ('Open with') + Menu contextuel natif + Afficher le menu contextuel natif (expérimental) + Ci-dessous, vous pouvez spécifier les éléments que vous souhaitez inclure dans le menu contextuel. Ils peuvent être partiels ('pen wit') ou complets ('Ouvrir avec'). + Vous pouvez spécifier ci-dessous les éléments que vous souhaitez exclure du menu contextuel. Ces éléments peuvent être partiels ('pen wit') ou complets ('Open with'). diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml index c43ea6231..106d75c45 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml @@ -151,8 +151,8 @@ Pode ser muito lento sem índice (que apenas existe em Everything v1.5+) - Native Context Menu - Display native context menu (experimental) - Below you can specify items you want to include in the context menu, they can be partial (e.g. 'pen wit') or complete ('Open with'). - Below you can specify items you want to exclude from context menu, they can be partial (e.g. 'pen wit') or complete ('Open with') + Menu de contexto nativo + Mostrar menu de contexto nativo (experimental) + Aqui pode especificar os itens a incluir no menu de contexto. Podem ser parciais (ex.: 'brir co') ou completos ('Abrir com'). + Aqui pode especificar os itens a excluir do menu de contexto. Podem ser parciais (ex.: 'brir co') ou completos ('Abrir com'). diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/vi.xaml index c8039c677..68c56f584 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/vi.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/vi.xaml @@ -27,12 +27,12 @@ Tùy chỉnh từ khóa hành động Liên kết truy cập nhanh Cài đặt mọi thứ - Preview Panel + Bảng xem trước Kích thước Date Created Date Modified - Display File Info - Date and time format + Hiển thị thông tin tệp + Định dạng ngày và giờ Tùy Chọn Sắp Xếp Đường dẫn mọi thứ: Khởi chạy ẩn @@ -53,29 +53,29 @@ Đã bật Khi bị tắt, Flow sẽ không thực thi tùy chọn tìm kiếm này và sẽ hoàn nguyên về '*' để giải phóng từ khóa hành động Tất cả mọi thứ - Windows Index - Direct Enumeration - File Editor Path + Chỉ mục Windows + Đếm trực tiếp + Đường dẫn trình soạn thảo tệp Folder Editor Path - Content Search Engine + Công cụ tìm kiếm nội dung Directory Recursive Search Engine - Index Search Engine + Công cụ tìm kiếm chỉ mục Mở tùy chọn lập chỉ mục Windows Thư mục - Find and manage files and folders via Windows Search or Everything + Tìm và quản lý tệp và thư mục thông qua Windows Search hoặc Everything - Ctrl + Enter to open the directory - Ctrl + Enter to open the containing folder + Ctrl + Enter để mở thư mục + Ctrl + Enter để mở thư mục chứa Copy đường dẫn - Copy path of current item to clipboard + Sao chép đường dẫn của mục hiện tại vào clipboard Sao chép - Copy current file to clipboard + Sao chép tập tin hiện tại vào clipboard Copy current folder to clipboard Xóa Permanently delete current file @@ -88,7 +88,7 @@ Open the location that contains current item Mở bằng trình chỉnh sửa: Failed to open file at {0} with Editor {1} at {2} - Open With Shell: + Mở bằng Shell: Failed to open folder {0} with Shell {1} at {2} Loại trừ các thư mục hiện tại và thư mục con khỏi Tìm kiếm chỉ mục Bị loại trừ khỏi Tìm kiếm chỉ mục diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml index 92687641a..8038427ca 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml @@ -44,10 +44,10 @@ Hãy chọn một nguồn dữ liệu Bạn có chắc chắn là muốn xóa các đặt hàng đã chọn? - Another program source with the same location already exists. + Đã tồn tại một nguồn chương trình khác có cùng vị trí. - Program Source - Edit directory and status of this program source. + Nguồn chương trình + Chỉnh sửa thư mục và trạng thái của nguồn chương trình này. Cập nhật Program Plugin will only index files with selected suffixes and .url files with selected protocols. @@ -73,7 +73,7 @@ Chạy với quyền quản trị Mở thư mục chứa Vô hiệu hóa chương trình này hiển thị - Open target folder + Mở thư mục đích Chương trình Tìm kiếm chương trình trong Flow Launcher diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.Shell/Languages/vi.xaml index 22d909686..1a0d55e66 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Languages/vi.xaml +++ b/Plugins/Flow.Launcher.Plugin.Shell/Languages/vi.xaml @@ -2,8 +2,8 @@ Thay thế Win + R - Close Command Prompt after pressing any key - Press any key to close this window... + Đóng Command Prompt sau khi nhấn phím bất kỳ + Nhấn phím bất kỳ để đóng cửa sổ này... Không đóng dấu nhắc lệnh sau khi thực hiện lệnh Luôn chạy với tư cách quản trị viên Xóa lựa chọn đã chọn diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.vi-VN.resx b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.vi-VN.resx index 851470744..1ec616d9d 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.vi-VN.resx +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.vi-VN.resx @@ -1132,7 +1132,7 @@ Area Control Panel (legacy settings) - Pen and touch + Bút và cảm ứng Area Control Panel (legacy settings) @@ -1144,15 +1144,15 @@ Area Control Panel (legacy settings) - Performance information and tools + Thông tin hiệu suất và công cụ Area Control Panel (legacy settings) - Permissions and history + Quyền và lịch sử Area Cortana - Personalization (category) + Cá nhân hóa (danh mục) Area Personalization @@ -1160,23 +1160,23 @@ Area Phone - Phone and modem + Điện thoại và modem Area Control Panel (legacy settings) - Phone and modem - Options + Điện thoại và modem - Tùy chọn Area Control Panel (legacy settings) - Phone calls + Cuộc gọi điện thoại Area Privacy - Phone - Default apps + Điện thoại - Ứng dụng mặc định Area System - Picture + Hình ảnh Hình ảnh From 55d61dee371ea3320640b8e07d60277f4459be75 Mon Sep 17 00:00:00 2001 From: DB P Date: Sun, 30 Jun 2024 16:42:15 +0900 Subject: [PATCH 25/31] Update README.md Add Sponsor --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 866cdf8b3..c09add1fd 100644 --- a/README.md +++ b/README.md @@ -330,13 +330,15 @@ Or download the [early access version](https://github.com/Flow-Launcher/Prerelea ## Sponsors -

- + + +
+
+ + -
-

From 763a3843b959bcdc841066033e50869177328603 Mon Sep 17 00:00:00 2001 From: DB P Date: Sun, 30 Jun 2024 16:47:30 +0900 Subject: [PATCH 26/31] Update README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c09add1fd..e06380981 100644 --- a/README.md +++ b/README.md @@ -332,7 +332,7 @@ Or download the [early access version](https://github.com/Flow-Launcher/Prerelea ## Sponsors

- + Appwrite Logo

From f2025791f83766833f43f6be9470f3c6fa4ac897 Mon Sep 17 00:00:00 2001 From: DB P Date: Sun, 30 Jun 2024 16:48:00 +0900 Subject: [PATCH 27/31] Update README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e06380981..4fe1392b4 100644 --- a/README.md +++ b/README.md @@ -337,7 +337,7 @@ Or download the [early access version](https://github.com/Flow-Launcher/Prerelea

- + Coderabbit Logo

From 3875d7fa6610ef491bec8831ce3e0b7bd0a6f913 Mon Sep 17 00:00:00 2001 From: DB P Date: Sun, 30 Jun 2024 16:48:28 +0900 Subject: [PATCH 28/31] remove style --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4fe1392b4..5cca0105b 100644 --- a/README.md +++ b/README.md @@ -337,7 +337,7 @@ Or download the [early access version](https://github.com/Flow-Launcher/Prerelea

- Coderabbit Logo + Coderabbit Logo

From 7729c7f4c73a2135b6cd0a689ae874d07461df6d Mon Sep 17 00:00:00 2001 From: DB P Date: Sun, 30 Jun 2024 16:53:05 +0900 Subject: [PATCH 29/31] Changed sponsor order --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5cca0105b..b5d075515 100644 --- a/README.md +++ b/README.md @@ -331,24 +331,21 @@ Or download the [early access version](https://github.com/Flow-Launcher/Prerelea ## Sponsors

- - Appwrite Logo - -
-
Coderabbit Logo + +
+
+ + Appwrite Logo

-


-

-

From 496050b64144ba13addc295281f401e116a7c133 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 30 Jun 2024 18:04:16 +1000 Subject: [PATCH 30/31] update sponsor order --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b5d075515..c563eafc9 100644 --- a/README.md +++ b/README.md @@ -336,13 +336,13 @@ Or download the [early access version](https://github.com/Flow-Launcher/Prerelea

- - Appwrite Logo + +

- - + + Appwrite Logo

From 7952a2ec53b9d9e63d2117b547c5453783c1b7d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:23:44 +0000 Subject: [PATCH 31/31] Bump Microsoft.VisualStudio.Threading from 17.7.30 to 17.10.48 Bumps [Microsoft.VisualStudio.Threading](https://github.com/microsoft/vs-threading) from 17.7.30 to 17.10.48. - [Release notes](https://github.com/microsoft/vs-threading/releases) - [Commits](https://github.com/microsoft/vs-threading/compare/v17.7.30...v17.10.48) --- updated-dependencies: - dependency-name: Microsoft.VisualStudio.Threading dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../Flow.Launcher.Infrastructure.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index 688b40c83..3a8e07b4a 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -55,7 +55,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive
- +