This commit is contained in:
ShH Y 2026-03-10 14:06:39 +08:00 committed by GitHub
commit 4a9970a426
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]
public bool WMPInstalled { get; set; } = true;
public bool SelectAllQueryOnReopen { get; set; } = true;
// This needs to be loaded last by staying at the bottom
public PluginsSettings PluginSettings { get; set; } = new PluginsSettings();

View file

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

View file

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

View file

@ -69,7 +69,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
}
}
public bool UseLogonTaskForStartup
{
get => Settings.UseLogonTaskForStartup;

View file

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