Skip to content

Commit

Permalink
hover/selection color
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Nov 13, 2024
1 parent bb221b6 commit 0f452d9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public MainViewModel()

_iconsCache.Connect()
.Filter(filterByText)
.Sort(SortExpressionComparer<IIconViewModel>.Ascending(e => e.Identifier))
.Sort(SortExpressionComparer<IIconViewModel>.Ascending(e => e.IconPackName).ThenByAscending(e => e.Name))
.Page(_pager)
.Do(change => PagingUpdate(change.Response))
.ObserveOn(RxApp.MainThreadScheduler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:vm="clr-namespace:MahApps.IconPacksBrowser.Avalonia.ViewModels"
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:helper="clr-namespace:MahApps.IconPacksBrowser.Avalonia.Helper"
xmlns:iconPacks="https://github.com/MahApps/IconPacks.Avalonia"
mc:Ignorable="d"
d:DesignWidth="800"
d:DesignHeight="450"
Expand Down Expand Up @@ -89,6 +90,16 @@
ItemTemplate="{StaticResource IconPacksBrowser.DataTemplates.ListBox.IconViewModel}"
ItemsSource="{Binding VisibleIcons}"
SelectedValue="{Binding SelectedIcon}">

<ListBox.Styles>
<Style Selector="ListBoxItem:selected iconPacks|PackIconControl#PackIcon">
<Setter Property="Foreground" Value="{DynamicResource SystemAccentColor}" />
</Style>
<Style Selector="ListBoxItem:pointerover iconPacks|PackIconControl#PackIcon">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemPointerOverForegroundThemeBrush}" />
</Style>
</ListBox.Styles>

<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<!-- <VirtualizingStackPanel Orientation="Vertical" /> -->
Expand Down

0 comments on commit 0f452d9

Please sign in to comment.