From fa8c3db5e1a22322543becefddea3a007d9988b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Wed, 19 May 2021 12:50:29 +0800 Subject: [PATCH 1/7] stop auto hiding scroller --- Flow.Launcher/SettingWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 651d7db09..4cb585597 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -36,7 +36,7 @@ - + From 7b50820765c87cd4fd7ba51354afca86673bc73f Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 19 Jun 2021 21:04:34 +1000 Subject: [PATCH 2/7] add option to switch auto scrollbar hide on/off --- .../UserSettings/Settings.cs | 2 ++ Flow.Launcher/Languages/en.xaml | 2 ++ Flow.Launcher/SettingWindow.xaml | 11 ++++++++--- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 12 ++++++++++++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 76a370978..bd847bf28 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -97,6 +97,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings public bool RememberLastLaunchLocation { get; set; } public bool IgnoreHotkeysOnFullscreen { get; set; } + public bool AutoHideScrollBar { get; set; } = false; + public HttpProxy Proxy { get; set; } = new HttpProxy(); [JsonConverter(typeof(JsonStringEnumConverter))] diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 6232492ba..bf34a842b 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -31,6 +31,8 @@ Ignore hotkeys in fullscreen mode Python Directory Auto Update + Auto Hide Scroll Bar + Automatically hides the setting window's scroll bar, and show when hover the mouse over it Select Hide Flow Launcher on startup Hide tray icon diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 4cb585597..a6a09a1be 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -36,7 +36,7 @@ - + @@ -63,9 +63,14 @@ - + + + + + Margin="10, 0, 10, 10" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding Settings.AutoHideScrollBar}"> diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 2108e2c40..05e170b09 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -61,6 +61,18 @@ namespace Flow.Launcher.ViewModel } } + public bool AutoHideScrollBar + { + get + { + return Settings.AutoHideScrollBar; + } + set + { + Settings.AutoHideScrollBar = value; + } + } + // This is only required to set at startup. When portable mode enabled/disabled a restart is always required private bool _portableMode = DataLocation.PortableDataLocationInUse(); public bool PortableMode From 3cc92c976f3d49ce904364d1c5d42d31e81fdfaa Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 19 Jun 2021 21:12:12 +1000 Subject: [PATCH 3/7] update wording --- Flow.Launcher/Languages/en.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index bf34a842b..838bfc1d1 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -32,7 +32,7 @@ Python Directory Auto Update Auto Hide Scroll Bar - Automatically hides the setting window's scroll bar, and show when hover the mouse over it + Automatically hides the setting window's scroll bar, and show when hover the mouse over it. This setting will take effect on next window open Select Hide Flow Launcher on startup Hide tray icon From f561b1166f516b158f1501eae58485b24a66e7c3 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 19 Jun 2021 21:38:35 +1000 Subject: [PATCH 4/7] update wording --- Flow.Launcher/Languages/en.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 838bfc1d1..ace13e5bb 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -32,7 +32,7 @@ Python Directory Auto Update Auto Hide Scroll Bar - Automatically hides the setting window's scroll bar, and show when hover the mouse over it. This setting will take effect on next window open + Automatically hides the Settings window scroll bar, and show when hover the mouse over it. This setting will take effect on next window open Select Hide Flow Launcher on startup Hide tray icon From a0011db9d3c3395116ab92853a28778aa92e302b Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 19 Jun 2021 21:49:07 +1000 Subject: [PATCH 5/7] add auto hide scroll bar option to Theme tab --- Flow.Launcher/SettingWindow.xaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index a6a09a1be..a04b78667 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -221,8 +221,10 @@ - - Open Theme Folder + From 77f8a8e27b2bd4c52126f4df188208c92cb90bf5 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Mon, 21 Jun 2021 13:39:54 +0800 Subject: [PATCH 6/7] Use direct property to allow calling onPropertyChanged Remove default value initialization --- .../UserSettings/Settings.cs | 2 +- Flow.Launcher/SettingWindow.xaml | 6 ++--- .../ViewModel/SettingWindowViewModel.cs | 22 +++++++------------ 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index bd847bf28..e7e7902d4 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -97,7 +97,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings public bool RememberLastLaunchLocation { get; set; } public bool IgnoreHotkeysOnFullscreen { get; set; } - public bool AutoHideScrollBar { get; set; } = false; + public bool AutoHideScrollBar { get; set; } public HttpProxy Proxy { get; set; } = new HttpProxy(); diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index a04b78667..ad24d189f 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -36,7 +36,7 @@ - + @@ -67,7 +67,7 @@ ToolTip="{DynamicResource ShouldUsePinyinToolTip}"> - @@ -117,7 +117,7 @@ + Margin="10, 0, 10, 10" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"> diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 05e170b09..b974efd03 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -63,14 +63,8 @@ namespace Flow.Launcher.ViewModel public bool AutoHideScrollBar { - get - { - return Settings.AutoHideScrollBar; - } - set - { - Settings.AutoHideScrollBar = value; - } + get => Settings.AutoHideScrollBar; + set => Settings.AutoHideScrollBar = value; } // This is only required to set at startup. When portable mode enabled/disabled a restart is always required @@ -150,11 +144,11 @@ namespace Flow.Launcher.ViewModel public bool ShouldUsePinyin { - get + get { - return Settings.ShouldUsePinyin; + return Settings.ShouldUsePinyin; } - set + set { Settings.ShouldUsePinyin = value; } @@ -193,7 +187,7 @@ namespace Flow.Launcher.ViewModel } HttpWebRequest request = (HttpWebRequest)WebRequest.Create(_updater.GitHubRepository); - + if (string.IsNullOrEmpty(proxyUserName) || string.IsNullOrEmpty(Settings.Proxy.Password)) { request.Proxy = new WebProxy(proxyServer, Settings.Proxy.Port); @@ -237,7 +231,7 @@ namespace Flow.Launcher.ViewModel var metadatas = PluginManager.AllPlugins .OrderBy(x => x.Metadata.Disabled) .ThenBy(y => y.Metadata.Name) - .Select(p => new PluginViewModel { PluginPair = p}) + .Select(p => new PluginViewModel { PluginPair = p }) .ToList(); return metadatas; } @@ -465,7 +459,7 @@ namespace Flow.Launcher.ViewModel #region about public string Website => Constant.Website; - public string ReleaseNotes => _updater.GitHubRepository + @"/releases/latest"; + public string ReleaseNotes => _updater.GitHubRepository + @"/releases/latest"; public string Documentation => Constant.Documentation; public static string Version => Constant.Version; public string ActivatedTimes => string.Format(_translater.GetTranslation("about_activate_times"), Settings.ActivateTimes); From 131c5cbfccf130d7910076c8673bba1c924a5754 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 21 Jun 2021 19:38:22 +1000 Subject: [PATCH 7/7] update binding for Theme tab --- Flow.Launcher/Languages/en.xaml | 2 +- Flow.Launcher/SettingWindow.xaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index ace13e5bb..573403823 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -32,7 +32,7 @@ Python Directory Auto Update Auto Hide Scroll Bar - Automatically hides the Settings window scroll bar, and show when hover the mouse over it. This setting will take effect on next window open + Automatically hides the Settings window scroll bar and show when hover the mouse over it Select Hide Flow Launcher on startup Hide tray icon diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index ad24d189f..d5ead386b 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -224,7 +224,7 @@