Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Flow.Launcher.Infrastructure/UserSettings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))]
Expand Down
2 changes: 2 additions & 0 deletions Flow.Launcher/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
<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="autoUpdates">Auto Update</system:String>
<system:String x:Key="autoHideScrollBar">Auto Hide Scroll Bar</system:String>
<system:String x:Key="autoHideScrollBarToolTip">Automatically hides the Settings window scroll bar and show when hover the mouse over it</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="hideNotifyIcon">Hide tray icon</system:String>
Expand Down
17 changes: 12 additions & 5 deletions Flow.Launcher/SettingWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<TabControl Height="auto" SelectedIndex="0">
<TabItem Header="{DynamicResource general}">
<ScrollViewer ui:ScrollViewerHelper.AutoHideScrollBars="True" Margin="60,30,0,30">
<ScrollViewer ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}" Margin="60,30,0,30">
<StackPanel Orientation="Vertical">
<ui:ToggleSwitch Margin="10" IsOn="{Binding PortableMode}">
<TextBlock Text="{DynamicResource portableMode}" />
Expand All @@ -63,9 +63,14 @@
<ui:ToggleSwitch Margin="10" IsOn="{Binding AutoUpdates}">
<TextBlock Text="{DynamicResource autoUpdates}" />
</ui:ToggleSwitch>
<CheckBox Margin="10" IsChecked="{Binding ShouldUsePinyin}" ToolTip="{DynamicResource ShouldUsePinyinToolTip}">
<CheckBox Margin="10" IsChecked="{Binding ShouldUsePinyin}"
ToolTip="{DynamicResource ShouldUsePinyinToolTip}">
<TextBlock Text="{DynamicResource ShouldUsePinyin}" />
</CheckBox>
<ui:ToggleSwitch Margin="10" IsOn="{Binding AutoHideScrollBar, Mode=TwoWay}"
ToolTip="{DynamicResource autoHideScrollBarToolTip}">
<TextBlock Text="{DynamicResource autoHideScrollBar}" />
</ui:ToggleSwitch>
<StackPanel Margin="10" Orientation="Horizontal">
<TextBlock Text="{DynamicResource querySearchPrecision}" FontSize="14" />
<ComboBox Margin="10 0 0 0" MaxWidth="200"
Expand Down Expand Up @@ -112,7 +117,7 @@
</TextBlock>
<ListBox SelectedIndex="0" SelectedItem="{Binding SelectedPlugin}"
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 AutoHideScrollBar, Mode=OneWay}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="3">
Expand Down Expand Up @@ -216,8 +221,10 @@
<Run Text="{DynamicResource browserMoreThemes}" />
</Hyperlink>
</TextBlock>
<Button DockPanel.Dock="Top" Margin="0,10,0,0" Width="180" HorizontalAlignment="Center" Click="OpenPluginFolder">Open Theme Folder</Button>
<ListBox DockPanel.Dock="Top" SelectedItem="{Binding SelectedTheme}" ItemsSource="{Binding Themes}"
<Button DockPanel.Dock="Top" Margin="0,10,0,0" Width="180" HorizontalAlignment="Center"
Click="OpenPluginFolder">Open Theme Folder</Button>
<ListBox DockPanel.Dock="Top" SelectedItem="{Binding SelectedTheme}" ItemsSource="{Binding Themes}"
ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"
Margin="10, 0, 10, 10" Width="180" Height="394" />

</DockPanel>
Expand Down
18 changes: 12 additions & 6 deletions Flow.Launcher/ViewModel/SettingWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -138,11 +144,11 @@ public string Language

public bool ShouldUsePinyin
{
get
get
{
return Settings.ShouldUsePinyin;
return Settings.ShouldUsePinyin;
}
set
set
{
Settings.ShouldUsePinyin = value;
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -225,7 +231,7 @@ public IList<PluginViewModel> 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;
}
Expand Down Expand Up @@ -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);
Expand Down