feat: update dark theme.

This commit is contained in:
rabbitism
2023-02-20 11:20:18 +08:00
parent 9208b1cd7e
commit daad51567e
3 changed files with 31 additions and 88 deletions

View File

@@ -16,120 +16,78 @@
<Style Selector="u|Badge"> <Style Selector="u|Badge">
<Setter Property="Margin" Value="14" /> <Setter Property="Margin" Value="14" />
</Style> </Style>
<Style Selector="Border">
<Setter Property="Background" Value="Orange" />
</Style>
</StackPanel.Styles> </StackPanel.Styles>
<TextBlock Text="Hello" /> <TextBlock Text="Hello" />
<u:Badge <u:Badge
HorizontalAlignment="Center" HorizontalAlignment="Center"
BadgeContent="500" BadgeContent="500"
OverflowCount="100"> OverflowCount="100">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<u:Badge BadgeContent="5" CornerPosition="TopLeft"> <u:Badge BadgeContent="5" CornerPosition="TopLeft">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge BadgeContent="5" CornerPosition="TopRight"> <u:Badge BadgeContent="5" CornerPosition="TopRight">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge BadgeContent="5" CornerPosition="BottomLeft"> <u:Badge BadgeContent="5" CornerPosition="BottomLeft">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge BadgeContent="5" CornerPosition="BottomRight"> <u:Badge BadgeContent="5" CornerPosition="BottomRight">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
</StackPanel> </StackPanel>
<u:Badge BadgeContent="SUCCEED!"> <u:Badge BadgeContent="SUCCEED!">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge HorizontalAlignment="Stretch" BadgeContent="VIP"> <u:Badge HorizontalAlignment="Stretch" BadgeContent="VIP">
<Border Height="50" Background="LightYellow" /> <Border Height="50" />
</u:Badge> </u:Badge>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<u:Badge <u:Badge
BadgeContent="VIP" BadgeContent="VIP"
CornerPosition="TopLeft" CornerPosition="TopLeft"
Dot="True"> Dot="True">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge <u:Badge
BadgeContent="VIP" BadgeContent="VIP"
CornerPosition="TopRight" CornerPosition="TopRight"
Dot="True"> Dot="True">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge <u:Badge
BadgeContent="VIP" BadgeContent="VIP"
CornerPosition="BottomLeft" CornerPosition="BottomLeft"
Dot="True"> Dot="True">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge <u:Badge
BadgeContent="VIP" BadgeContent="VIP"
CornerPosition="BottomRight" CornerPosition="BottomRight"
Dot="True"> Dot="True">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<u:Badge BadgeContent="URSA" Classes="Primary"> <u:Badge BadgeContent="URSA" Classes="Primary">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge BadgeContent="URSA" Classes="Secondary"> <u:Badge BadgeContent="URSA" Classes="Secondary">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge BadgeContent="URSA" Classes="Tertiary"> <u:Badge BadgeContent="URSA" Classes="Tertiary">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge BadgeContent="URSA" Classes="Warning"> <u:Badge BadgeContent="URSA" Classes="Warning">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge BadgeContent="URSA" Classes="Danger"> <u:Badge BadgeContent="URSA" Classes="Danger">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
@@ -137,46 +95,31 @@
BadgeContent="URSA" BadgeContent="URSA"
Classes="Primary" Classes="Primary"
Dot="True"> Dot="True">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge <u:Badge
BadgeContent="URSA" BadgeContent="URSA"
Classes="Secondary" Classes="Secondary"
Dot="True"> Dot="True">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge <u:Badge
BadgeContent="URSA" BadgeContent="URSA"
Classes="Tertiary" Classes="Tertiary"
Dot="True"> Dot="True">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge <u:Badge
BadgeContent="URSA" BadgeContent="URSA"
Classes="Warning" Classes="Warning"
Dot="True"> Dot="True">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
<u:Badge <u:Badge
BadgeContent="URSA" BadgeContent="URSA"
Classes="Danger" Classes="Danger"
Dot="True"> Dot="True">
<Border <Border Width="100" Height="50" />
Width="100"
Height="50"
Background="LightYellow" />
</u:Badge> </u:Badge>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">

View File

@@ -1,10 +1,10 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<SolidColorBrush x:Key="BadgeBorderBrush" Color="White" /> <SolidColorBrush x:Key="BadgeBorderBrush" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="BadgeForeground" Color="White" /> <SolidColorBrush x:Key="BadgeForeground" Color="White" />
<SolidColorBrush x:Key="BadgePrimaryBadgeBackground" Color="#0077F0" /> <SolidColorBrush x:Key="BadgePrimaryBadgeBackground" Color="#FF54A9FF" />
<SolidColorBrush x:Key="BadgeSecondaryBadgeBackground" Color="#0095EE" /> <SolidColorBrush x:Key="BadgeSecondaryBadgeBackground" Color="#FF40B4F3" />
<SolidColorBrush x:Key="BadgeTertiaryBadgeBackground" Color="#6B7075" /> <SolidColorBrush x:Key="BadgeTertiaryBadgeBackground" Color="#FF888D92" />
<SolidColorBrush x:Key="BadgeWarningBadgeBackground" Color="#FC8800" /> <SolidColorBrush x:Key="BadgeWarningBadgeBackground" Color="#FFFFAE43" />
<SolidColorBrush x:Key="BadgeDangerBadgeBackground" Color="#F93920" /> <SolidColorBrush x:Key="BadgeDangerBadgeBackground" Color="#FFFC725A" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<SolidColorBrush x:Key="BadgeBorderBrush" Color="White" /> <SolidColorBrush x:Key="BadgeBorderBrush" Opacity="0.08" Color="#1C1F23" />
<SolidColorBrush x:Key="BadgeForeground" Color="White" /> <SolidColorBrush x:Key="BadgeForeground" Color="White" />
<SolidColorBrush x:Key="BadgePrimaryBadgeBackground" Color="#0077F0" /> <SolidColorBrush x:Key="BadgePrimaryBadgeBackground" Color="#0077F0" />
<SolidColorBrush x:Key="BadgeSecondaryBadgeBackground" Color="#0095EE" /> <SolidColorBrush x:Key="BadgeSecondaryBadgeBackground" Color="#0095EE" />