mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-05 08:46:34 +08:00
feat: add AI style - Colorful & Gradient to TagLabel.
This commit is contained in:
@@ -75,7 +75,16 @@
|
||||
<Label Classes="Solid Grey" Theme="{StaticResource TagLabel}">Grey</Label>
|
||||
<Label Classes="Solid White" Theme="{StaticResource TagLabel}">White</Label>
|
||||
</WrapPanel>
|
||||
|
||||
<WrapPanel>
|
||||
<Label Classes="Colorful Gradient" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
<Label Classes="Colorful Gradient Ghost" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
<Label Classes="Colorful Gradient Solid" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<Label Classes="Colorful" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
<Label Classes="Colorful Ghost" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
<Label Classes="Colorful Solid" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type Label}" TargetType="Label">
|
||||
@@ -162,6 +171,7 @@
|
||||
<!-- Shape: Square,Circle. Default is Square -->
|
||||
<!-- Size: Small, Large. Default is Small -->
|
||||
<!-- Color: Red, Pink, Purple, Violet, Indigo, Blue, LightBlue, Cyan, Teal, Green, LightGreen, Lime, Yellow, Amber, Orange, Grey, White. Default is Grey -->
|
||||
<!-- AI style: Colorful, Gradient -->
|
||||
<ControlTheme x:Key="TagLabel" TargetType="Label">
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource LabelTagBorderThickness}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource LabelTagSmallHeight}" />
|
||||
@@ -395,5 +405,34 @@
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagSolidWhiteBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagSolidWhiteBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Colorful">
|
||||
<Setter Property="FontWeight" Value="{StaticResource LabelTagColorfulFontWeight}" />
|
||||
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulLightForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulLightBackground}" />
|
||||
<Style Selector="^.Ghost">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulGhostForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulGhostBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagColorfulGhostBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^.Solid">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulSolidForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulSolidBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Gradient">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulGradientLightForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulGradientLightBackground}" />
|
||||
<Style Selector="^.Ghost">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulGradientGhostForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulGradientGhostBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagColorfulGradientGhostBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^.Solid">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulGradientSolidForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulGradientSolidBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -88,6 +88,21 @@
|
||||
<StaticResource x:Key="LabelTagSolidWhiteBackground" ResourceKey="SemiColorBackground4" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidWhiteBorderBrush" Opacity="0.7" Color="{StaticResource SemiGrey2Color}" />
|
||||
|
||||
<StaticResource x:Key="LabelTagColorfulLightForeground" ResourceKey="SemiColorAIPurple" />
|
||||
<StaticResource x:Key="LabelTagColorfulLightBackground" ResourceKey="SemiAIPurple0" />
|
||||
<StaticResource x:Key="LabelTagColorfulGhostForeground" ResourceKey="SemiColorAIPurple" />
|
||||
<StaticResource x:Key="LabelTagColorfulGhostBackground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="LabelTagColorfulGhostBorderBrush" ResourceKey="SemiColorAIPurple" />
|
||||
<StaticResource x:Key="LabelTagColorfulSolidForeground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="LabelTagColorfulSolidBackground" ResourceKey="SemiColorAIPurple" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientLightForeground" ResourceKey="SemiColorAIGeneral" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientLightBackground" ResourceKey="SemiAIGeneral0" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientGhostForeground" ResourceKey="SemiColorAIGeneral" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientGhostBackground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientGhostBorderBrush" ResourceKey="SemiColorAIGeneral" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientSolidForeground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientSolidBackground" ResourceKey="SemiColorAIGeneral" />
|
||||
|
||||
<!-- Obsolete -->
|
||||
<StaticResource x:Key="LabelTagLightWhiteForeground" ResourceKey="LabelTagSolidWhiteForeground" />
|
||||
<StaticResource x:Key="LabelTagLightWhiteBackground" ResourceKey="LabelTagSolidWhiteBackground" />
|
||||
|
||||
@@ -88,6 +88,21 @@
|
||||
<StaticResource x:Key="LabelTagSolidWhiteBackground" ResourceKey="SemiColorBackground4" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidWhiteBorderBrush" Opacity="0.7" Color="{StaticResource SemiGrey2Color}" />
|
||||
|
||||
<StaticResource x:Key="LabelTagColorfulLightForeground" ResourceKey="SemiColorAIPurple" />
|
||||
<StaticResource x:Key="LabelTagColorfulLightBackground" ResourceKey="SemiAIPurple0" />
|
||||
<StaticResource x:Key="LabelTagColorfulGhostForeground" ResourceKey="SemiColorAIPurple" />
|
||||
<StaticResource x:Key="LabelTagColorfulGhostBackground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="LabelTagColorfulGhostBorderBrush" ResourceKey="SemiColorAIPurple" />
|
||||
<StaticResource x:Key="LabelTagColorfulSolidForeground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="LabelTagColorfulSolidBackground" ResourceKey="SemiColorAIPurple" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientLightForeground" ResourceKey="SemiColorAIGeneral" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientLightBackground" ResourceKey="SemiAIGeneral0" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientGhostForeground" ResourceKey="SemiColorAIGeneral" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientGhostBackground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientGhostBorderBrush" ResourceKey="SemiColorAIGeneral" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientSolidForeground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="LabelTagColorfulGradientSolidBackground" ResourceKey="SemiColorAIGeneral" />
|
||||
|
||||
<!-- Obsolete -->
|
||||
<StaticResource x:Key="LabelTagLightWhiteForeground" ResourceKey="LabelTagSolidWhiteForeground" />
|
||||
<StaticResource x:Key="LabelTagLightWhiteBackground" ResourceKey="LabelTagSolidWhiteBackground" />
|
||||
|
||||
@@ -8,4 +8,5 @@
|
||||
<StaticResource x:Key="LabelTagFontWeight" ResourceKey="SemiFontWeightRegular" />
|
||||
<StaticResource x:Key="LabelTagSquareCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<StaticResource x:Key="LabelTagCircleCornerRadius" ResourceKey="SemiBorderRadiusFull" />
|
||||
<StaticResource x:Key="LabelTagColorfulFontWeight" ResourceKey="SemiFontWeightBold" />
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user