Improve placeholder text tooltip

This commit is contained in:
Jack251970 2025-03-29 15:49:22 +08:00
parent 6f32a6f098
commit 78b661733d
3 changed files with 9 additions and 4 deletions

View file

@ -39,7 +39,7 @@
<system:String x:Key="GameMode">Game Mode</system:String>
<system:String x:Key="GameModeToolTip">Suspend the use of Hotkeys.</system:String>
<system:String x:Key="PositionReset">Position Reset</system:String>
<system:String x:Key="queryTextBoxSuggestion">Type here to search</system:String>
<system:String x:Key="queryTextBoxPlaceholder">Type here to search</system:String>
<!-- Setting General -->
<system:String x:Key="flowlauncher_settings">Settings</system:String>
@ -203,7 +203,7 @@
<system:String x:Key="ShowPlaceholder">Show placeholder</system:String>
<system:String x:Key="ShowPlaceholderTip">Display placeholder when query is empty</system:String>
<system:String x:Key="PlaceholderText">Placeholder text</system:String>
<system:String x:Key="PlaceholderTextTip">Change placeholder text. Input empty will use: Type here to search</system:String>
<system:String x:Key="PlaceholderTextTip">Change placeholder text. Input empty will use: {0}</system:String>
<system:String x:Key="KeepMaxResults">Fixed Window Size</system:String>
<system:String x:Key="KeepMaxResultsToolTip">The window size is not adjustable by dragging.</system:String>

View file

@ -265,6 +265,11 @@ public partial class SettingsPaneThemeViewModel : BaseModel
set => Settings.ShowPlaceholder = value;
}
public string PlaceholderTextTip
{
get => string.Format(App.API.GetTranslation("PlaceholderTextTip"), App.API.GetTranslation("queryTextBoxPlaceholder"));
}
public string PlaceholderText
{
get => Settings.PlaceholderText;

View file

@ -549,9 +549,9 @@
<cc:Card
Title="{DynamicResource PlaceholderText}"
Icon="&#xED59;"
Sub="{DynamicResource PlaceholderTextTip}">
Sub="{Binding PlaceholderTextTip}">
<TextBox
MinWidth="80"
MinWidth="150"
Text="{Binding PlaceholderText}"
TextWrapping="NoWrap" />
</cc:Card>