From f485e8605a14361bdd6417eba0b5bf2d6a92b0cc Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 29 Mar 2025 13:10:06 +0800
Subject: [PATCH] Support placeholder text
---
.../UserSettings/Settings.cs | 11 +++++
Flow.Launcher/Languages/en.xaml | 4 +-
Flow.Launcher/MainWindow.xaml | 8 ++++
Flow.Launcher/MainWindow.xaml.cs | 43 +++++++++++++++++++
.../ViewModels/SettingsPaneThemeViewModel.cs | 6 +++
.../SettingPages/Views/SettingsPaneTheme.xaml | 15 +++++--
6 files changed, 83 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 63debfb47..38c4fbe11 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -113,6 +113,17 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public double? SettingWindowLeft { get; set; } = null;
public System.Windows.WindowState SettingWindowState { get; set; } = WindowState.Normal;
+ bool _showPlaceholder { get; set; } = true;
+ public bool ShowPlaceholder
+ {
+ get => _showPlaceholder;
+ set
+ {
+ _showPlaceholder = value;
+ OnPropertyChanged();
+ }
+ }
+
public int CustomExplorerIndex { get; set; } = 0;
[JsonIgnore]
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index f0454b496..f4e2d88af 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -39,7 +39,7 @@
Game Mode
Suspend the use of Hotkeys.
Position Reset
- Reset search window position
+ Type here to search
Settings
@@ -202,6 +202,8 @@
Date
This theme supports two(light/dark) modes.
This theme supports Blur Transparent Background.
+ Placeholder Text
+ Display placeholder text when query is empty
Hotkey
diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml
index 533819d17..b9e355e2f 100644
--- a/Flow.Launcher/MainWindow.xaml
+++ b/Flow.Launcher/MainWindow.xaml
@@ -218,6 +218,14 @@
+
Settings.SoundVolume = value;
}
+ public bool ShowPlaceholder
+ {
+ get => Settings.ShowPlaceholder;
+ set => Settings.ShowPlaceholder = value;
+ }
+
public bool UseClock
{
get => Settings.UseClock;
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
index 614237146..5b92ee9b9 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
@@ -477,7 +477,6 @@
-
-
-
+
+
+
+
+