feat: Foreground.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
Value="{Binding Value}"
|
||||
Count="{Binding Count}"
|
||||
DefaultValue="{Binding DefaultValue}"
|
||||
Foreground="{StaticResource SemiRed5}"
|
||||
Character="{StaticResource LoveHeartGeometry}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
Data="{TemplateBinding Character}"
|
||||
Fill="{TemplateBinding Background}" />
|
||||
<Border Name="{x:Static u:RatingCharacter.PART_IconGlyph}"
|
||||
IsVisible="False"
|
||||
ClipToBounds="True">
|
||||
<Path Width="24"
|
||||
Height="24"
|
||||
@@ -30,15 +31,14 @@
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="RenderTransform" Value="scale(1.1)" />
|
||||
</Style>
|
||||
<Style Selector="^:selected">
|
||||
<Setter Property="Foreground" Value="{DynamicResource RatingCharacterForeground}" />
|
||||
<Style Selector="^:selected /template/ Border#PART_IconGlyph">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type u:Rating}" TargetType="u:Rating">
|
||||
<Setter Property="Foreground" Value="{DynamicResource RatingCharacterUnSelectedForeground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource RatingCharacterForeground}" />
|
||||
<Setter Property="Character" Value="{DynamicResource RatingStarIconGlyph}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="ItemTemplate">
|
||||
<DataTemplate>
|
||||
<u:RatingCharacter />
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="RatingCharacterUnSelectedForeground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="RatingCharacterForeground" Color="#FDDE43" />
|
||||
<SolidColorBrush x:Key="RatingCharacterBackground" Opacity="0.12" Color="White" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,5 +1,4 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="RatingCharacterUnSelectedForeground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="RatingCharacterForeground" Color="#FAC800" />
|
||||
<SolidColorBrush x:Key="RatingCharacterBackground" Opacity="0.05" Color="#2E3238" />
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user