feat: improve date picker calendar view. add three more themes.

This commit is contained in:
rabbitism
2024-10-03 02:01:19 +08:00
parent d52f97a058
commit 39be4fd1cd
6 changed files with 52 additions and 5 deletions

View File

@@ -3,7 +3,7 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u-semi="https://irihi.tech/ursa/themes/semi"
RequestedThemeVariant="{x:Static semi:SemiTheme.Aquatic}"
RequestedThemeVariant="{x:Static semi:SemiTheme.Desert}"
xmlns:semi="https://irihi.tech/semi"
xmlns:demo="clr-namespace:Ursa.Demo">
<Application.Styles>

View File

@@ -14,6 +14,7 @@
<Setter Property="MinWidth" Value="{DynamicResource CalenderDayMinWidth}" />
<Setter Property="MinHeight" Value="{DynamicResource CalenderDayMinHeight}" />
<Setter Property="Margin" Value="{DynamicResource CalenderDayMargin}" />
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonForeground}" />
<Setter Property="Background" Value="{DynamicResource CalenderDayBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CalenderDayBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource CalenderDayBorderThickness}" />
@@ -43,6 +44,7 @@
<Setter Property="Background" Value="{DynamicResource CalenderDayInRangeBackground}" />
<Setter Property="CornerRadius" Value="{DynamicResource CalenderDayInRangeCornerRadius}" />
<Setter Property="BorderThickness" Value="{DynamicResource CalenderDayNoBorderThickness}" />
<Setter Property="Foreground" Value="{DynamicResource CalenderDaySelectedForeground}" />
</Style>
<Style Selector="^:today">
@@ -143,7 +145,7 @@
<ControlTheme x:Key="{x:Type u:CalendarYearButton}" TargetType="u:CalendarYearButton">
<Setter Property="MinWidth" Value="{DynamicResource CalenderYearMinWidth}" />
<Setter Property="MinHeight" Value="{DynamicResource CalenderYearMinHeight }" />
<Setter Property="MinHeight" Value="{DynamicResource CalenderYearMinHeight}" />
<Setter Property="Margin" Value="{DynamicResource CalenderYearMargin}" />
<Setter Property="Background" Value="{DynamicResource CalenderYearBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CalenderYearBorderBrush}" />

View File

@@ -6,9 +6,9 @@
<ResourceInclude x:Key="Dark" Source="./Themes/Dark/_index.axaml" />
<ResourceInclude x:Key="Light" Source="./Themes/Light/_index.axaml" />
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Aquatic}" Source="./Themes/HighContrast/Aquatic.axaml" />
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Desert}" Source="./Themes/HighContrast/Aquatic.axaml" />
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Dust}" Source="./Themes/HighContrast/Aquatic.axaml" />
<ResourceInclude x:Key="{x:Static semi:SemiTheme.NightSky}" Source="./Themes/HighContrast/Aquatic.axaml" />
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Desert}" Source="./Themes/HighContrast/Desert.axaml" />
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Dust}" Source="./Themes/HighContrast/Dusk.axaml" />
<ResourceInclude x:Key="{x:Static semi:SemiTheme.NightSky}" Source="./Themes/HighContrast/NightSky.axaml" />
</ResourceDictionary.ThemeDictionaries>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="../Controls/_index.axaml" />

View File

@@ -0,0 +1,15 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<Color x:Key="WindowColor">#FFFAEF</Color>
<Color x:Key="WindowTextColor">#3D3D3D</Color>
<Color x:Key="HotlightColor">#1C5E75</Color>
<Color x:Key="GrayTextColor">#676767</Color>
<Color x:Key="HighlightTextColor">#FFF5E3</Color>
<Color x:Key="HighlightColor">#903909</Color>
<Color x:Key="ButtonTextColor">#202020</Color>
<Color x:Key="ButtonFaceColor">#FFFAEF</Color>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="Base.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

View File

@@ -0,0 +1,15 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<Color x:Key="WindowColor">#2D3236</Color>
<Color x:Key="WindowTextColor">#FFFFFF</Color>
<Color x:Key="HotlightColor">#70EBDE</Color>
<Color x:Key="GrayTextColor">#A6A6A6</Color>
<Color x:Key="HighlightTextColor">#212D3B</Color>
<Color x:Key="HighlightColor">#A1BFDE</Color>
<Color x:Key="ButtonTextColor">#B6F6F0</Color>
<Color x:Key="ButtonFaceColor">#2D3236</Color>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="Base.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

View File

@@ -0,0 +1,15 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<Color x:Key="WindowColor">#000000</Color>
<Color x:Key="WindowTextColor">#FFFFFF</Color>
<Color x:Key="HotlightColor">#8080FF</Color>
<Color x:Key="GrayTextColor">#A6A6A6</Color>
<Color x:Key="HighlightTextColor">#2B2B2B</Color>
<Color x:Key="HighlightColor">#D6B4FD</Color>
<Color x:Key="ButtonTextColor">#FFEE32</Color>
<Color x:Key="ButtonFaceColor">#000000</Color>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="Base.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>