diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml index f57c0e2d9..ece66034c 100644 --- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml +++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml @@ -71,6 +71,7 @@ Minimum="-999" SpinButtonPlacementMode="Inline" ToolTip="{DynamicResource priorityToolTip}" + ValueChanged="NumberBox_OnValueChanged" Value="{Binding Priority, Mode=TwoWay}" /> diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs index dfa03a204..ab9496266 100644 --- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs +++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs @@ -1,4 +1,6 @@ -namespace Flow.Launcher.Resources.Controls; +using ModernWpf.Controls; + +namespace Flow.Launcher.Resources.Controls; public partial class InstalledPluginDisplay { @@ -6,4 +8,12 @@ public partial class InstalledPluginDisplay { InitializeComponent(); } + + private void NumberBox_OnValueChanged(NumberBox sender, NumberBoxValueChangedEventArgs args) + { + if (double.IsNaN(args.NewValue)) + { + sender.Value = 0; + } + } }