mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #3872 from Flow-Launcher/plugin_list_mouse_hover
Clear plugin list selection to make sure all items can be mouse hovered
This commit is contained in:
commit
ec2af81e62
2 changed files with 11 additions and 0 deletions
|
|
@ -122,6 +122,7 @@
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
ItemContainerStyle="{StaticResource PluginList}"
|
ItemContainerStyle="{StaticResource PluginList}"
|
||||||
ItemsSource="{Binding Source={StaticResource PluginCollectionView}}"
|
ItemsSource="{Binding Source={StaticResource PluginCollectionView}}"
|
||||||
|
Loaded="PluginListBox_Loaded"
|
||||||
ScrollViewer.CanContentScroll="False"
|
ScrollViewer.CanContentScroll="False"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
SnapsToDevicePixels="True"
|
SnapsToDevicePixels="True"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
|
|
@ -33,6 +35,14 @@ public partial class SettingsPanePlugins
|
||||||
base.OnNavigatedTo(e);
|
base.OnNavigatedTo(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PluginListBox_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
// After list is loaded, we need to clear selection to make sure all items can be mouse hovered
|
||||||
|
// because the selected item cannot be hovered.
|
||||||
|
if (sender is not ListBox listBox) return;
|
||||||
|
listBox.SelectedIndex = -1;
|
||||||
|
}
|
||||||
|
|
||||||
private void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
private void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.PropertyName == nameof(SettingsPanePluginsViewModel.FilterText))
|
if (e.PropertyName == nameof(SettingsPanePluginsViewModel.FilterText))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue