mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
add option to switch auto scrollbar hide on/off
This commit is contained in:
parent
35967328aa
commit
7b50820765
4 changed files with 24 additions and 3 deletions
|
|
@ -97,6 +97,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
||||||
public bool RememberLastLaunchLocation { get; set; }
|
public bool RememberLastLaunchLocation { get; set; }
|
||||||
public bool IgnoreHotkeysOnFullscreen { get; set; }
|
public bool IgnoreHotkeysOnFullscreen { get; set; }
|
||||||
|
|
||||||
|
public bool AutoHideScrollBar { get; set; } = false;
|
||||||
|
|
||||||
public HttpProxy Proxy { get; set; } = new HttpProxy();
|
public HttpProxy Proxy { get; set; } = new HttpProxy();
|
||||||
|
|
||||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@
|
||||||
<system:String x:Key="ignoreHotkeysOnFullscreen">Ignore hotkeys in fullscreen mode</system:String>
|
<system:String x:Key="ignoreHotkeysOnFullscreen">Ignore hotkeys in fullscreen mode</system:String>
|
||||||
<system:String x:Key="pythonDirectory">Python Directory</system:String>
|
<system:String x:Key="pythonDirectory">Python Directory</system:String>
|
||||||
<system:String x:Key="autoUpdates">Auto Update</system:String>
|
<system:String x:Key="autoUpdates">Auto Update</system:String>
|
||||||
|
<system:String x:Key="autoHideScrollBar">Auto Hide Scroll Bar</system:String>
|
||||||
|
<system:String x:Key="autoHideScrollBarToolTip">Automatically hides the setting window's scroll bar, and show when hover the mouse over it</system:String>
|
||||||
<system:String x:Key="selectPythonDirectory">Select</system:String>
|
<system:String x:Key="selectPythonDirectory">Select</system:String>
|
||||||
<system:String x:Key="hideOnStartup">Hide Flow Launcher on startup</system:String>
|
<system:String x:Key="hideOnStartup">Hide Flow Launcher on startup</system:String>
|
||||||
<system:String x:Key="hideNotifyIcon">Hide tray icon</system:String>
|
<system:String x:Key="hideNotifyIcon">Hide tray icon</system:String>
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
<TabControl Height="auto" SelectedIndex="0">
|
<TabControl Height="auto" SelectedIndex="0">
|
||||||
<TabItem Header="{DynamicResource general}">
|
<TabItem Header="{DynamicResource general}">
|
||||||
<ScrollViewer ui:ScrollViewerHelper.AutoHideScrollBars="False" Margin="60,30,0,30">
|
<ScrollViewer ui:ScrollViewerHelper.AutoHideScrollBars="{Binding Settings.AutoHideScrollBar}" Margin="60,30,0,30">
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<ui:ToggleSwitch Margin="10" IsOn="{Binding PortableMode}">
|
<ui:ToggleSwitch Margin="10" IsOn="{Binding PortableMode}">
|
||||||
<TextBlock Text="{DynamicResource portableMode}" />
|
<TextBlock Text="{DynamicResource portableMode}" />
|
||||||
|
|
@ -63,9 +63,14 @@
|
||||||
<ui:ToggleSwitch Margin="10" IsOn="{Binding AutoUpdates}">
|
<ui:ToggleSwitch Margin="10" IsOn="{Binding AutoUpdates}">
|
||||||
<TextBlock Text="{DynamicResource autoUpdates}" />
|
<TextBlock Text="{DynamicResource autoUpdates}" />
|
||||||
</ui:ToggleSwitch>
|
</ui:ToggleSwitch>
|
||||||
<CheckBox Margin="10" IsChecked="{Binding ShouldUsePinyin}" ToolTip="{DynamicResource ShouldUsePinyinToolTip}">
|
<CheckBox Margin="10" IsChecked="{Binding ShouldUsePinyin}"
|
||||||
|
ToolTip="{DynamicResource ShouldUsePinyinToolTip}">
|
||||||
<TextBlock Text="{DynamicResource ShouldUsePinyin}" />
|
<TextBlock Text="{DynamicResource ShouldUsePinyin}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
<ui:ToggleSwitch Margin="10" IsOn="{Binding AutoHideScrollBar}"
|
||||||
|
ToolTip="{DynamicResource autoHideScrollBarToolTip}">
|
||||||
|
<TextBlock Text="{DynamicResource autoHideScrollBar}" />
|
||||||
|
</ui:ToggleSwitch>
|
||||||
<StackPanel Margin="10" Orientation="Horizontal">
|
<StackPanel Margin="10" Orientation="Horizontal">
|
||||||
<TextBlock Text="{DynamicResource querySearchPrecision}" FontSize="14" />
|
<TextBlock Text="{DynamicResource querySearchPrecision}" FontSize="14" />
|
||||||
<ComboBox Margin="10 0 0 0" MaxWidth="200"
|
<ComboBox Margin="10 0 0 0" MaxWidth="200"
|
||||||
|
|
@ -112,7 +117,7 @@
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<ListBox SelectedIndex="0" SelectedItem="{Binding SelectedPlugin}"
|
<ListBox SelectedIndex="0" SelectedItem="{Binding SelectedPlugin}"
|
||||||
ItemsSource="{Binding PluginViewModels}"
|
ItemsSource="{Binding PluginViewModels}"
|
||||||
Margin="10, 0, 10, 10" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ui:ScrollViewerHelper.AutoHideScrollBars="True">
|
Margin="10, 0, 10, 10" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding Settings.AutoHideScrollBar}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal" Margin="3">
|
<StackPanel Orientation="Horizontal" Margin="3">
|
||||||
|
|
|
||||||
|
|
@ -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
|
// This is only required to set at startup. When portable mode enabled/disabled a restart is always required
|
||||||
private bool _portableMode = DataLocation.PortableDataLocationInUse();
|
private bool _portableMode = DataLocation.PortableDataLocationInUse();
|
||||||
public bool PortableMode
|
public bool PortableMode
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue