mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Support numerical box for search delay
This commit is contained in:
parent
24bbfcc413
commit
67268284e0
2 changed files with 16 additions and 5 deletions
|
|
@ -91,7 +91,8 @@
|
|||
Maximum="1000"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Inline"
|
||||
ToolTip="{DynamicResource searchDelayToolTip}" />
|
||||
ToolTip="{DynamicResource searchDelayToolTip}"
|
||||
Value="{Binding PluginSearchDelayTime, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Put OnOffControl after PriorityControl & SearchDelayControl so that it can display correctly -->
|
||||
|
|
|
|||
|
|
@ -93,13 +93,23 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
public int? PluginSearchDelayTime
|
||||
public double PluginSearchDelayTime
|
||||
{
|
||||
get => PluginPair.Metadata.SearchDelayTime;
|
||||
get => PluginPair.Metadata.SearchDelayTime == null ?
|
||||
double.NaN :
|
||||
PluginPair.Metadata.SearchDelayTime.Value;
|
||||
set
|
||||
{
|
||||
PluginPair.Metadata.SearchDelayTime = value;
|
||||
PluginSettingsObject.SearchDelayTime = value;
|
||||
if (double.IsNaN(value))
|
||||
{
|
||||
PluginPair.Metadata.SearchDelayTime = null;
|
||||
PluginSettingsObject.SearchDelayTime = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
PluginPair.Metadata.SearchDelayTime = (int)value;
|
||||
PluginSettingsObject.SearchDelayTime = (int)value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue