feat: white & transparent color.

This commit is contained in:
Zhang Dian
2024-06-26 22:33:32 +08:00
parent 69f660faad
commit c78bb5e7aa
3 changed files with 27 additions and 9 deletions

View File

@@ -14,8 +14,8 @@
<Setter Property="MinWidth" Value="32" />
<Setter Property="MinHeight" Value="32" />
<Setter Property="Margin" Value="0 2" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Background" Value="{DynamicResource DatePickerDayBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DatePickerDayBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="CornerRadius" Value="3" />
@@ -71,7 +71,7 @@
<Setter Property="Background" Value="{DynamicResource DatePickerDaySelectedBackground}" />
<Setter Property="CornerRadius" Value="3" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Foreground" Value="{DynamicResource DatePickerDaySelectedForeground}" />
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource DatePickerDaySelectedPointeroverBackground}" />
</Style>
@@ -85,7 +85,7 @@
<Setter Property="CornerRadius" Value="3 0 0 3" />
<Setter Property="Background" Value="{DynamicResource DatePickerDayStartEndDateBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DatePickerDayStartEndDateBorderBrush}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Foreground" Value="{DynamicResource DatePickerDaySelectedForeground}" />
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource DatePickerDayStartEndDatePointeroverBackground}" />
</Style>
@@ -102,7 +102,7 @@
<Setter Property="CornerRadius" Value="0 3 3 0" />
<Setter Property="Background" Value="{DynamicResource DatePickerDayStartEndDateBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DatePickerDayStartEndDateBorderBrush}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Foreground" Value="{DynamicResource DatePickerDaySelectedForeground}" />
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource DatePickerDayStartEndDatePointeroverBackground}" />
</Style>
@@ -145,8 +145,8 @@
<Setter Property="MinWidth" Value="32" />
<Setter Property="MinHeight" Value="32" />
<Setter Property="Margin" Value="0 2" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Background" Value="{DynamicResource DatePickerYearBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DatePickerYearBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="3" />
<Setter Property="Template">
@@ -179,7 +179,7 @@
<Setter Property="Background" Value="{DynamicResource DatePickerYearSelectedBackground}" />
<Setter Property="CornerRadius" Value="3" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Foreground" Value="{DynamicResource DatePickerYearSelectedForeground}" />
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource DatePickerYearSelectedPointeroverBackground}" />
</Style>
@@ -189,7 +189,7 @@
<ControlTheme x:Key="{x:Type u:CalendarView}" TargetType="u:CalendarView">
<Setter Property="MinHeight" Value="260" />
<Setter Property="MinWidth" Value="260" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Background" Value="{DynamicResource DatePickerViewBackground}" />
<Setter Property="Template">
<ControlTemplate TargetType="u:CalendarView">
<Grid Background="{TemplateBinding Background}" RowDefinitions="Auto, *">

View File

@@ -1,5 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--CalenderDayButton-->
<SolidColorBrush x:Key="DatePickerDayBackground" Color="Transparent" />
<SolidColorBrush x:Key="DatePickerDayBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="DatePickerDayInRangeBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="DatePickerDayTodayBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="DatePickerDayTodayForeground" Color="#54A9FF" />
@@ -8,6 +10,7 @@
<SolidColorBrush x:Key="DatePickerDayPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="DatePickerDaySelectedBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="DatePickerDaySelectedForeground" Color="White" />
<SolidColorBrush x:Key="DatePickerDaySelectedPointeroverBackground" Color="#7FC1FF" />
<SolidColorBrush x:Key="DatePickerDaySelectedPressedBackground" Color="#A9D7FF" />
@@ -25,8 +28,14 @@
<SolidColorBrush x:Key="DatePickerDayBlackoutTodayBackground" Color="#135CB8" />
<!--CalenderYearButton-->
<SolidColorBrush x:Key="DatePickerYearBackground" Color="Transparent" />
<SolidColorBrush x:Key="DatePickerYearBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="DatePickerYearPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="DatePickerYearPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="DatePickerYearSelectedBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="DatePickerYearSelectedForeground" Color="White" />
<SolidColorBrush x:Key="DatePickerYearSelectedPointeroverBackground" Color="#7FC1FF" />
<!--CalenderView-->
<SolidColorBrush x:Key="DatePickerViewBackground" Color="Transparent" />
</ResourceDictionary>

View File

@@ -1,5 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--CalenderDayButton-->
<SolidColorBrush x:Key="DatePickerDayBackground" Color="Transparent" />
<SolidColorBrush x:Key="DatePickerDayBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="DatePickerDayInRangeBackground" Color="#EAF5FF" />
<SolidColorBrush x:Key="DatePickerDayTodayBackground" Opacity="0.05" Color="#2E3238" />
<SolidColorBrush x:Key="DatePickerDayTodayForeground" Color="#0077FA" />
@@ -8,6 +10,7 @@
<SolidColorBrush x:Key="DatePickerDayPressedBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="DatePickerDaySelectedBackground" Color="#0077FA" />
<SolidColorBrush x:Key="DatePickerDaySelectedForeground" Color="White" />
<SolidColorBrush x:Key="DatePickerDaySelectedPointeroverBackground" Color="#0062D6" />
<SolidColorBrush x:Key="DatePickerDaySelectedPressedBackground" Color="#004FB3" />
@@ -25,8 +28,14 @@
<SolidColorBrush x:Key="DatePickerDayBlackoutTodayBackground" Color="#98CDFD" />
<!--CalenderYearButton-->
<SolidColorBrush x:Key="DatePickerYearBackground" Color="Transparent" />
<SolidColorBrush x:Key="DatePickerYearBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="DatePickerYearPointeroverBackground" Opacity="0.05" Color="#2E3238" />
<SolidColorBrush x:Key="DatePickerYearPressedBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="DatePickerYearSelectedBackground" Color="#0077FA" />
<SolidColorBrush x:Key="DatePickerYearSelectedForeground" Color="White" />
<SolidColorBrush x:Key="DatePickerYearSelectedPointeroverBackground" Color="#0062D6" />
<!--CalenderView-->
<SolidColorBrush x:Key="DatePickerViewBackground" Color="Transparent" />
</ResourceDictionary>