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 651d7db09a2..4cb58559760 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 76a370978bd..bd847bf2825 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -97,6 +97,8 @@ public bool HideNotifyIcon 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 6232492baf0..bf34a842bd0 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 4cb58559760..a6a09a1be60 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 2108e2c4043..05e170b0938 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -61,6 +61,18 @@ public bool AutoUpdates } } + 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 bf34a842bd0..838bfc1d13d 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 838bfc1d13d..ace13e5bb08 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 a6a09a1be60..a04b7866763 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 bd847bf2825..e7e7902d453 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -97,7 +97,7 @@ public bool HideNotifyIcon 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 a04b7866763..ad24d189f27 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 05e170b0938..b974efd0337 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -63,14 +63,8 @@ public bool AutoUpdates 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 @@ public string Language public bool ShouldUsePinyin { - get + get { - return Settings.ShouldUsePinyin; + return Settings.ShouldUsePinyin; } - set + set { Settings.ShouldUsePinyin = value; } @@ -193,7 +187,7 @@ public string TestProxy() } 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 @@ public IList PluginViewModels 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 @@ public FamilyTypeface SelectedResultFontFaces #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 ace13e5bb08..573403823ca 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 ad24d189f27..d5ead386bb7 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -224,7 +224,7 @@