mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add UI to toggle QuickLook usage
This commit is contained in:
parent
99b5197372
commit
1e1f29b163
4 changed files with 26 additions and 4 deletions
|
|
@ -159,7 +159,11 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
/// when false Alphabet static service will always return empty results
|
||||
/// </summary>
|
||||
public bool ShouldUsePinyin { get; set; } = false;
|
||||
|
||||
public bool UseQuickLook { get; set; } = false;
|
||||
|
||||
public bool AlwaysPreview { get; set; } = false;
|
||||
|
||||
public bool AlwaysStartEn { get; set; } = false;
|
||||
|
||||
[JsonInclude, JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
|
|
|
|||
|
|
@ -80,6 +80,8 @@
|
|||
<system:String x:Key="ShouldUsePinyinToolTip">Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese.</system:String>
|
||||
<system:String x:Key="AlwaysPreview">Always Preview</system:String>
|
||||
<system:String x:Key="AlwaysPreviewToolTip">Always open preview panel when Flow activates. Press {0} to toggle preview.</system:String>
|
||||
<system:String x:Key="UseQuickLook">Use QuickLook</system:String>
|
||||
<system:String x:Key="UseQuickLookToolTip">Use QuickLook to preview file results.</system:String>
|
||||
<system:String x:Key="shadowEffectNotAllowed">Shadow effect is not allowed while current theme has blur effect enabled</system:String>
|
||||
|
||||
<!-- Setting Plugin -->
|
||||
|
|
|
|||
|
|
@ -859,6 +859,24 @@
|
|||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource UseQuickLook}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource UseQuickLookToolTip}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding Settings.UseQuickLook}"
|
||||
Style="{DynamicResource SideToggleSwitch}"
|
||||
ToolTip="{DynamicResource UseQuickLookToolTip}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
|
|
|
|||
|
|
@ -575,8 +575,7 @@ namespace Flow.Launcher.ViewModel
|
|||
[RelayCommand]
|
||||
private void TogglePreview()
|
||||
{
|
||||
bool useThirdPartyPreview = true;
|
||||
if (useThirdPartyPreview)
|
||||
if (Settings.UseQuickLook)
|
||||
{
|
||||
if (!ExternalPreviewOpen)
|
||||
{
|
||||
|
|
@ -624,8 +623,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
private void UpdatePreview()
|
||||
{
|
||||
bool useThirdPartyPreview = true;
|
||||
if (useThirdPartyPreview)
|
||||
if (Settings.UseQuickLook)
|
||||
{
|
||||
if (ExternalPreviewOpen)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue