mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[PTRun]Fix cutting off and using previous input (#19215)
* Deselect previous selected item because it might not be valid. * fast execute non-delayed queries * Speling fixxes. * Fixed _isTextSetProgrammatically check for when PTRSearchQueryFastResultsWithDelay = false * Resoved some comments. * Added partial delay for fast plugins * Updates settings UI for second throttle value. Changed text. * 'Verbiage' update
This commit is contained in:
@@ -57,6 +57,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
[JsonPropertyName("search_input_delay")]
|
||||
public int SearchInputDelay { get; set; }
|
||||
|
||||
[JsonPropertyName("search_input_delay_fast")]
|
||||
public int SearchInputDelayFast { get; set; }
|
||||
|
||||
[JsonPropertyName("search_clicked_item_weight")]
|
||||
public int SearchClickedItemWeight { get; set; }
|
||||
|
||||
|
||||
@@ -313,6 +313,23 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public int SearchInputDelayFast
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.SearchInputDelayFast;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.SearchInputDelayFast != value)
|
||||
{
|
||||
settings.Properties.SearchInputDelayFast = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int SearchInputDelay
|
||||
{
|
||||
get
|
||||
|
||||
@@ -415,16 +415,28 @@
|
||||
<value>Clear the previous query on launch</value>
|
||||
</data>
|
||||
<data name="PowerLauncher_SearchQueryResultsWithDelay.Header" xml:space="preserve">
|
||||
<value>Delay search</value>
|
||||
<value>Input Smoothing</value>
|
||||
<comment>This is about adding a delay to wait for more input before executing a search</comment>
|
||||
</data>
|
||||
<data name="PowerLauncher_SearchQueryResultsWithDelay.Description" xml:space="preserve">
|
||||
<value>Add a delay to wait for more input before executing a search</value>
|
||||
<value>Wait for more input before searching. This reduces interface jumpiness and system load.</value>
|
||||
</data>
|
||||
<data name="PowerLauncher_SearchInputDelayMs.Header" xml:space="preserve">
|
||||
<value>Search delay (ms)</value>
|
||||
<data name="PowerLauncher_FastSearchInputDelayMs.Header" xml:space="preserve">
|
||||
<value>Immediate plugins</value>
|
||||
</data>
|
||||
<data name="PowerLauncher_FastSearchInputDelayMs.Description" xml:space="preserve">
|
||||
<value>Affects the plugins that make the UI wait for their results by this amount. Recommended: 30-50 ms.</value>
|
||||
</data>
|
||||
<data name="PowerLauncher_SlowSearchInputDelayMs.Header" xml:space="preserve">
|
||||
<value>Background execution plugins</value>
|
||||
</data>
|
||||
<data name="PowerLauncher_SlowSearchInputDelayMs.Description" xml:space="preserve">
|
||||
<value>Affects the plugins that execute in the background by this amount. Recommended: 100-150 ms.</value>
|
||||
</data>
|
||||
<data name="PowerLauncher_SearchInputDelayMs.Header" xml:space="preserve">
|
||||
<value>Fast plugin throttle (ms)</value>
|
||||
<comment>ms = milliseconds</comment>
|
||||
</data>
|
||||
</data>
|
||||
<data name="KeyboardManager_KeysMappingLayoutRightHeader.Text" xml:space="preserve">
|
||||
<value>To:</value>
|
||||
<comment>Keyboard Manager mapping keys view right header</comment>
|
||||
|
||||
@@ -103,9 +103,23 @@
|
||||
</controls:Setting>
|
||||
</controls:SettingExpander.Header>
|
||||
<controls:SettingExpander.Content>
|
||||
<controls:Setting x:Uid="PowerLauncher_SearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}" Style="{StaticResource ExpanderContentSettingStyle}">
|
||||
<controls:Setting.ActionContent>
|
||||
<muxc:NumberBox Minimum="0"
|
||||
<StackPanel>
|
||||
<controls:Setting x:Uid="PowerLauncher_FastSearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}" Style="{StaticResource ExpanderContentSettingStyle}">
|
||||
<controls:Setting.ActionContent>
|
||||
<muxc:NumberBox Minimum="0"
|
||||
Maximum="500"
|
||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelayFast}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
HorizontalAlignment="Left"
|
||||
SmallChange="10"
|
||||
LargeChange="50"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<controls:Setting x:Uid="PowerLauncher_SlowSearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}" Style="{StaticResource ExpanderContentSettingStyle}">
|
||||
<controls:Setting.ActionContent>
|
||||
<muxc:NumberBox Minimum="0"
|
||||
Maximum="1000"
|
||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelay}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
@@ -113,8 +127,11 @@
|
||||
HorizontalAlignment="Left"
|
||||
SmallChange="10"
|
||||
LargeChange="50"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
</controls:SettingExpander.Content>
|
||||
</controls:SettingExpander>
|
||||
<controls:SettingExpander IsExpanded="True">
|
||||
|
||||
Reference in New Issue
Block a user