Skip to content

Commit ec2af81

Browse files
authored
Merge pull request #3872 from Flow-Launcher/plugin_list_mouse_hover
Clear plugin list selection to make sure all items can be mouse hovered
2 parents 9f7aca4 + ee4dc39 commit ec2af81

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
FontSize="14"
123123
ItemContainerStyle="{StaticResource PluginList}"
124124
ItemsSource="{Binding Source={StaticResource PluginCollectionView}}"
125+
Loaded="PluginListBox_Loaded"
125126
ScrollViewer.CanContentScroll="False"
126127
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
127128
SnapsToDevicePixels="True"

Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using System.ComponentModel;
2+
using System.Windows;
3+
using System.Windows.Controls;
24
using System.Windows.Data;
35
using System.Windows.Input;
46
using System.Windows.Navigation;
@@ -33,6 +35,14 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
3335
base.OnNavigatedTo(e);
3436
}
3537

38+
private void PluginListBox_Loaded(object sender, RoutedEventArgs e)
39+
{
40+
// After list is loaded, we need to clear selection to make sure all items can be mouse hovered
41+
// because the selected item cannot be hovered.
42+
if (sender is not ListBox listBox) return;
43+
listBox.SelectedIndex = -1;
44+
}
45+
3646
private void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e)
3747
{
3848
if (e.PropertyName == nameof(SettingsPanePluginsViewModel.FilterText))

0 commit comments

Comments
 (0)