This commit is contained in:
ShH Y 2026-03-05 10:54:24 +08:00 committed by GitHub
commit 4d0cb7f410
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 2 deletions

View file

@ -537,6 +537,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
[JsonIgnore] [JsonIgnore]
public bool WMPInstalled { get; set; } = true; public bool WMPInstalled { get; set; } = true;
public bool SelectAllQueryOnReopen { get; set; } = true;
// This needs to be loaded last by staying at the bottom // This needs to be loaded last by staying at the bottom
public PluginsSettings PluginSettings { get; set; } = new PluginsSettings(); public PluginsSettings PluginSettings { get; set; } = new PluginsSettings();

View file

@ -21,6 +21,7 @@
Closing="OnClosing" Closing="OnClosing"
Deactivated="OnDeactivated" Deactivated="OnDeactivated"
Icon="Images/app.png" Icon="Images/app.png"
Initialized="OnInitialized"
Left="{Binding Settings.WindowLeft, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Left="{Binding Settings.WindowLeft, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Loaded="OnLoaded" Loaded="OnLoaded"
LocationChanged="OnLocationChanged" LocationChanged="OnLocationChanged"
@ -248,6 +249,7 @@
FontSize="{Binding QueryBoxFontSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="{Binding QueryBoxFontSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
InputMethod.PreferredImeConversionMode="{Binding StartWithEnglishMode, Converter={StaticResource BoolToIMEConversionModeConverter}}" InputMethod.PreferredImeConversionMode="{Binding StartWithEnglishMode, Converter={StaticResource BoolToIMEConversionModeConverter}}"
InputMethod.PreferredImeState="{Binding StartWithEnglishMode, Converter={StaticResource BoolToIMEStateConverter}}" InputMethod.PreferredImeState="{Binding StartWithEnglishMode, Converter={StaticResource BoolToIMEStateConverter}}"
Loaded="SelectAllQueryText"
PreviewDragOver="QueryTextBox_OnPreviewDragOver" PreviewDragOver="QueryTextBox_OnPreviewDragOver"
PreviewKeyUp="QueryTextBox_KeyUp" PreviewKeyUp="QueryTextBox_KeyUp"
Style="{DynamicResource QueryBoxStyle}" Style="{DynamicResource QueryBoxStyle}"

View file

@ -334,6 +334,11 @@ namespace Flow.Launcher
} }
}; };
if (_settings.SelectAllQueryOnReopen)
{
SelectAllQueryText();
}
// QueryTextBox.Text change detection (modified to only work when character count is 1 or higher) // QueryTextBox.Text change detection (modified to only work when character count is 1 or higher)
QueryTextBox.TextChanged += (s, e) => UpdateClockPanelVisibility(); QueryTextBox.TextChanged += (s, e) => UpdateClockPanelVisibility();
@ -1496,5 +1501,10 @@ namespace Flow.Launcher
} }
#endregion #endregion
private void SelectAllQueryText()
{
QueryTextBox.SelectAll();
}
} }
} }

View file

@ -1,4 +1,4 @@
<Window <Window
x:Class="Flow.Launcher.SettingWindow" x:Class="Flow.Launcher.SettingWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"