From 1e1f29b163d1ec1a124c76a1c81eab36056aa5d5 Mon Sep 17 00:00:00 2001
From: Vic <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sat, 22 Apr 2023 15:00:21 +0800
Subject: [PATCH] Add UI to toggle QuickLook usage
---
.../UserSettings/Settings.cs | 4 ++++
Flow.Launcher/Languages/en.xaml | 2 ++
Flow.Launcher/SettingWindow.xaml | 18 ++++++++++++++++++
Flow.Launcher/ViewModel/MainViewModel.cs | 6 ++----
4 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 7f62d82c8..17abec804 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -159,7 +159,11 @@ namespace Flow.Launcher.Infrastructure.UserSettings
/// when false Alphabet static service will always return empty results
///
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))]
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 30c117378..e3433b98f 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -80,6 +80,8 @@
Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese.
Always Preview
Always open preview panel when Flow activates. Press {0} to toggle preview.
+ Use QuickLook
+ Use QuickLook to preview file results.
Shadow effect is not allowed while current theme has blur effect enabled
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index 665d16b8f..2b39b3b94 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -859,6 +859,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 02dcd2248..9f055d640 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -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)
{