[Run] Fix plugins selection style (#30546)

* fix plugin selection style

* addressed feedbacks and tweaks
This commit is contained in:
Davide Giacometti 2023-12-27 18:26:54 +01:00 committed by GitHub
parent ccd401fc16
commit 740299189a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 23 deletions

View File

@ -108,7 +108,7 @@
Grid.Column="1"
Margin="12,0,0,0"
VerticalAlignment="Center"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Text="{Binding Plugin.Description}"
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap" />

View File

@ -5,13 +5,8 @@
<core:Double x:Key="TitleFontSize">16</core:Double>
<!-- This removes the selection state of the default WpfUI ListViewItemStyle -->
<Style x:Key="PluginsListViewItemStyle" TargetType="{x:Type ListViewItem}">
<Setter Property="Foreground">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource TextFillColorPrimary}" />
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="{DynamicResource ListViewItemForeground}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="Margin" Value="0,0,0,2" />
@ -31,35 +26,24 @@
<ContentPresenter Margin="{TemplateBinding Padding}" />
<Rectangle
x:Name="ActiveRectangle"
Width="4"
Width="3"
Height="18"
Margin="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Fill="{DynamicResource ListViewItemPillFillBrush}"
RadiusX="2"
RadiusY="2"
Visibility="Collapsed">
<Rectangle.Fill>
<SolidColorBrush Color="{DynamicResource SystemAccentColorSecondary}" />
</Rectangle.Fill>
</Rectangle>
Visibility="Collapsed" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource SubtleFillColorSecondary}" />
</Setter.Value>
</Setter>
<Setter TargetName="Border" Property="Background" Value="{DynamicResource SubtleFillColorTertiaryBrush}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="ActiveRectangle" Property="Visibility" Value="Visible" />
<Setter TargetName="Border" Property="Background">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource SubtleFillColorSecondary}" />
</Setter.Value>
</Setter>
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ControlAltFillColorQuarternaryBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>