diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 76a370978bd..e7e7902d453 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; } + 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..573403823ca 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 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 651d7db09a2..d5ead386bb7 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 AutoHideScrollBar, Mode=OneWay}"> @@ -216,8 +221,10 @@ - - Open Theme Folder + diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 2108e2c4043..b974efd0337 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -61,6 +61,12 @@ public bool AutoUpdates } } + public bool AutoHideScrollBar + { + 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 private bool _portableMode = DataLocation.PortableDataLocationInUse(); public bool PortableMode @@ -138,11 +144,11 @@ public string Language public bool ShouldUsePinyin { - get + get { - return Settings.ShouldUsePinyin; + return Settings.ShouldUsePinyin; } - set + set { Settings.ShouldUsePinyin = value; } @@ -181,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); @@ -225,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; } @@ -453,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);