From 15255ddf147feca7eaf361be09cd115e2dd52f29 Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 29 May 2024 17:40:56 +0900 Subject: [PATCH 01/16] Fix Logic --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 1 + Flow.Launcher/SettingWindow.xaml.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 6528f626c..d3b3c1910 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -88,6 +88,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings public double SettingWindowWidth { get; set; } = 1000; public double SettingWindowHeight { get; set; } = 700; + public bool SettingWindowFirstLaunch { get; set; } = true; public double SettingWindowTop { get; set; } public double SettingWindowLeft { get; set; } public System.Windows.WindowState SettingWindowState { get; set; } = WindowState.Normal; diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 957379ce4..66bba05cb 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -110,10 +110,11 @@ public partial class SettingWindow public void InitializePosition() { - if (_settings.SettingWindowTop == null) + if (_settings.SettingWindowFirstLaunch || _settings.SettingWindowFirstLaunch == null) { Top = WindowTop(); Left = WindowLeft(); + _settings.SettingWindowFirstLaunch = false; } else { From 6ad21bd63633d9f60d9531815767bffadc8264b6 Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 29 May 2024 18:16:35 +0900 Subject: [PATCH 02/16] Fix Logic --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 4 ++-- Flow.Launcher/SettingWindow.xaml.cs | 6 +++--- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index d3b3c1910..39c096f80 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -89,8 +89,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings public double SettingWindowWidth { get; set; } = 1000; public double SettingWindowHeight { get; set; } = 700; public bool SettingWindowFirstLaunch { get; set; } = true; - public double SettingWindowTop { get; set; } - public double SettingWindowLeft { get; set; } + public double? SettingWindowTop { get; set; } = null; + public double? SettingWindowLeft { get; set; } = null; public System.Windows.WindowState SettingWindowState { get; set; } = WindowState.Normal; public int CustomExplorerIndex { get; set; } = 0; diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 66bba05cb..e6e4090e6 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -110,7 +110,7 @@ public partial class SettingWindow public void InitializePosition() { - if (_settings.SettingWindowFirstLaunch || _settings.SettingWindowFirstLaunch == null) + if (_settings.SettingWindowTop == null || _settings.SettingWindowLeft == null) { Top = WindowTop(); Left = WindowLeft(); @@ -118,8 +118,8 @@ public partial class SettingWindow } else { - Top = _settings.SettingWindowTop; - Left = _settings.SettingWindowLeft; + Top = _settings.SettingWindowTop.Value; + Left = _settings.SettingWindowLeft.Value; } WindowState = _settings.SettingWindowState; } diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 481802045..04dd6312b 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -52,13 +52,13 @@ public class SettingWindowViewModel : BaseModel set => Settings.SettingWindowHeight = value; } - public double SettingWindowTop + public double? SettingWindowTop { get => Settings.SettingWindowTop; set => Settings.SettingWindowTop = value; } - public double SettingWindowLeft + public double? SettingWindowLeft { get => Settings.SettingWindowLeft; set => Settings.SettingWindowLeft = value; From 2be21eeae6b03e3f61b10e7fa9316a44ba6df466 Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 29 May 2024 18:18:03 +0900 Subject: [PATCH 03/16] Remove SettingWIndowFirstLaunch --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 39c096f80..458846665 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -88,7 +88,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings public double SettingWindowWidth { get; set; } = 1000; public double SettingWindowHeight { get; set; } = 700; - public bool SettingWindowFirstLaunch { get; set; } = true; public double? SettingWindowTop { get; set; } = null; public double? SettingWindowLeft { get; set; } = null; public System.Windows.WindowState SettingWindowState { get; set; } = WindowState.Normal; From 664dde9778000804d5397c618913b38423ef4a7a Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 29 May 2024 18:18:50 +0900 Subject: [PATCH 04/16] Remove FirstLaunchValue --- Flow.Launcher/SettingWindow.xaml.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index e6e4090e6..de4fd1f91 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -114,7 +114,6 @@ public partial class SettingWindow { Top = WindowTop(); Left = WindowLeft(); - _settings.SettingWindowFirstLaunch = false; } else { From 105515eecbb09a9a9b9da5ad1e53111323c5cc5c Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 30 May 2024 01:00:14 +0900 Subject: [PATCH 05/16] - Treat the preview panel height equal to the resultlist height - Modify the image width to fit in the preview area if it is a media file --- Flow.Launcher/MainWindow.xaml | 1 + .../Views/PreviewPanel.xaml | 24 +++++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 2b10f79b3..3a1cb1825 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -514,6 +514,7 @@ - + + Stretch="Uniform"> @@ -53,8 +51,20 @@ - - + + + From 311829ea9c1afcd116f2360b0f87bbcbebe16d36 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 30 May 2024 01:13:05 +0900 Subject: [PATCH 06/16] Add Preview MinHeight for too low result item case --- Flow.Launcher/MainWindow.xaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 3a1cb1825..dec42e029 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -439,6 +439,7 @@ Style="{DynamicResource PreviewArea}" Visibility="{Binding PreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}"> Date: Thu, 30 May 2024 01:17:39 +0900 Subject: [PATCH 07/16] Remove Normal Preview's Minheight --- Flow.Launcher/MainWindow.xaml | 1 - 1 file changed, 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index dec42e029..d5f8b4912 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -439,7 +439,6 @@ Style="{DynamicResource PreviewArea}" Visibility="{Binding PreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}"> Date: Thu, 30 May 2024 02:48:50 +0900 Subject: [PATCH 08/16] Adjust Layout --- Flow.Launcher/MainWindow.xaml | 1 - Flow.Launcher/MainWindow.xaml.cs | 1 - .../Views/PreviewPanel.xaml | 40 +++++++++++-------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index d5f8b4912..3a1cb1825 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -514,7 +514,6 @@