feat: overall color.

This commit is contained in:
Zhang Dian
2023-12-13 00:10:03 +08:00
parent 3a519faa6a
commit b54725683b

View File

@@ -15,15 +15,17 @@
</Design.DataContext>
<UserControl.Resources>
<PathGeometry x:Key="InfoPath">M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z</PathGeometry>
<SolidColorBrush x:Key="MaskBackground" Opacity="0.2" Color="{DynamicResource SemiRed5Color}" />
<SolidColorBrush x:Key="MaskBackground" Opacity="0.2" Color="{DynamicResource SemiBlue3Color}" />
<SolidColorBrush x:Key="MaskBorderBrush" Color="{DynamicResource SemiBlue5Color}" />
</UserControl.Resources>
<UserControl.Styles>
<Style Selector="u|Badge">
<Setter Property="Margin" Value="12" />
</Style>
<Style Selector="u|Badge > Border">
<Setter Property="Background" Value="{DynamicResource SemiPurple4Color}" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="Margin" Value="10" />
<Style Selector="^ > Border">
<Setter Property="Theme" Value="{DynamicResource CardBorder}" />
<Setter Property="Width" Value="100" />
<Setter Property="Height" Value="60" />
</Style>
</Style>
<Style Selector="u|DualBadge">
<Setter Property="Margin" Value="4" />
@@ -104,7 +106,7 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{DynamicResource MaskBackground}"
BorderBrush="{DynamicResource SemiRed5Color}"
BorderBrush="{DynamicResource MaskBorderBrush}"
BorderThickness="0,0,1,0"
IsHitTestVisible="False" />
<Rectangle
@@ -119,7 +121,7 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{DynamicResource MaskBackground}"
BorderBrush="{DynamicResource SemiRed5Color}"
BorderBrush="{DynamicResource MaskBorderBrush}"
BorderThickness="1,0,0,0"
IsHitTestVisible="False" />
</Grid>
@@ -178,20 +180,26 @@
<u:Divider HorizontalContentAlignment="Right">Badge</u:Divider>
<WrapPanel Orientation="Horizontal">
<u:Badge BadgeContent="Ursa" CornerPosition="TopRight">
<Border Width="100" Height="50" />
<Border Classes="Hover">
<TextBlock Text="Pyro"/>
</Border>
</u:Badge>
<u:Badge
HorizontalAlignment="Center"
CornerPosition="TopRight"
BadgeContent="500"
OverflowCount="99">
<Border Width="100" Height="50" />
<Border Classes="Hover">
<TextBlock Text="Hydro"/>
</Border>
</u:Badge>
<u:Badge
BadgeContent="Ursa"
CornerPosition="TopRight"
Dot="True">
<Border Width="100" Height="50" />
<Border Classes="Hover">
<TextBlock Text="Ameno"/>
</Border>
</u:Badge>
<u:Badge BadgeContent="Ursa" />
@@ -199,16 +207,24 @@
</WrapPanel>
<WrapPanel Orientation="Horizontal">
<u:Badge BadgeContent="Ursa" Classes="Secondary">
<Border Width="100" Height="50" />
<Border Classes="Hover">
<TextBlock Text="Electro"/>
</Border>
</u:Badge>
<u:Badge BadgeContent="Ursa" Classes="Tertiary" CornerPosition="BottomLeft">
<Border Width="100" Height="50" />
<Border Classes="Hover">
<TextBlock Text="Dendro"/>
</Border>
</u:Badge>
<u:Badge BadgeContent="Ursa" Classes="Warning" CornerPosition="BottomRight">
<Border Width="100" Height="50" />
<Border Classes="Hover">
<TextBlock Text="Cryo"/>
</Border>
</u:Badge>
<u:Badge BadgeContent="Ursa" Classes="Danger" CornerPosition="TopRight">
<Border Width="100" Height="50" />
<Border Classes="Hover">
<TextBlock Text="Geo"/>
</Border>
</u:Badge>
</WrapPanel>
@@ -271,7 +287,7 @@
<u:Divider Orientation="Vertical" />
<TextBlock Text="Linux" />
</StackPanel>
<Grid Height="100" Background="{DynamicResource SemiCyan4Color}">
<Grid Height="100" Background="{DynamicResource MaskBackground}">
<u:Divider HorizontalContentAlignment="Stretch">Stretch</u:Divider>
</Grid>
</StackPanel>