Compare commits

...

8 commits

Author SHA1 Message Date
ShH Y
3473e7b379
Merge 712e269f06 into 73f657f84e 2026-02-24 14:55:11 +08:00
Jack Ye
73f657f84e
Merge pull request #4279 from Flow-Launcher/websearch_ui
Some checks are pending
Build / build (push) Waiting to run
Enable TwoWay binding for MaxSuggestions NumberBox
2026-02-24 14:25:10 +08:00
Jack Ye
c9baab7ac9
Merge branch 'dev' into websearch_ui 2026-02-24 00:08:25 +08:00
Jack251970
72269db8e6 Enable TwoWay binding for MaxSuggestions NumberBox
Changed NumberBox binding for Settings.MaxSuggestions from OneWay to TwoWay, allowing user input in the UI to update the underlying setting. This ensures changes made by users are saved back to the settings model.
2026-02-24 00:07:36 +08:00
Jack Ye
712e269f06
Merge branch 'dev' into add-select-all-query 2025-06-06 23:13:26 +08:00
Jack251970
d9d92c61ce Clean up codes 2025-03-13 15:05:41 +08:00
Jack Ye
18ab03bd2c
Merge branch 'dev' into add-select-all-query 2025-03-13 13:42:34 +08:00
ShH Y
77d2cd8dc1 Add setting to select all query text on window reopen
* **SettingsPaneGeneralViewModel.cs**
  - Add `SelectAllQueryOnReopen` property
  - Bind the new property to the settings in the constructor

* **MainWindow.xaml.cs**
  - Update `OnLoaded` method to select all query text if the new setting is enabled
  - Add `SelectAllQueryText` method to handle selecting all query text

* **MainWindow.xaml**
  - Bind `QueryTextBox` to the new setting to select all query text when the window is reopened

* **SettingWindow.xaml.cs**
  - Initialize the new checkbox based on the settings
2025-01-11 19:47:32 +08:00
6 changed files with 17 additions and 3 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

@ -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.TextChanged += (s, e) => UpdateClockPanelVisibility();
@ -1496,5 +1501,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"

View file

@ -164,7 +164,7 @@
SpinButtonPlacementMode="Compact"
ValidationMode="InvalidInputOverwritten"
ValueChanged="NumberBox_ValueChanged"
Value="{Binding Settings.MaxSuggestions, Mode=OneWay}" />
Value="{Binding Settings.MaxSuggestions, Mode=TwoWay}" />
</StackPanel>
<CheckBox
Name="EnableSuggestion"