Skip to content

Commit 9ad1d69

Browse files
authored
Fix Calendar styling. (#1570)
Co-authored-by: Nuklon <[email protected]>
1 parent 5c70262 commit 9ad1d69

File tree

7 files changed

+194
-113
lines changed

7 files changed

+194
-113
lines changed

src/Wpf.Ui/Controls/Calendar/Calendar.xaml

Lines changed: 170 additions & 101 deletions
Large diffs are not rendered by default.

src/Wpf.Ui/Resources/Theme/Dark.xaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,14 +358,16 @@
358358

359359
<!-- Calendar -->
360360
<SolidColorBrush x:Key="CalendarViewForeground" Color="{StaticResource TextFillColorPrimary}" />
361-
<SolidColorBrush x:Key="CalendarViewBackground" Color="{StaticResource AcrylicBackgroundFillColorDefault}" />
362-
<SolidColorBrush x:Key="CalendarViewBorderBrush" Color="{StaticResource SurfaceStrokeColorFlyout}" />
363-
<SolidColorBrush x:Key="CalendarViewItemBackgroundPointerOver" Color="{StaticResource ControlFillColorSecondary}" />
361+
<SolidColorBrush x:Key="CalendarViewBackground" Color="{StaticResource ControlFillColorInputActive}" />
362+
<SolidColorBrush x:Key="CalendarViewBorderBrush" Color="{StaticResource ControlStrokeColorDefault}" />
363+
<SolidColorBrush x:Key="CalendarViewItemBackgroundPointerOver" Color="{StaticResource SubtleFillColorSecondary}" />
364+
<SolidColorBrush x:Key="CalendarViewItemBackgroundPressed" Color="{StaticResource SubtleFillColorTertiary}" />
364365
<SolidColorBrush x:Key="CalendarViewSelectedBackground" Color="{DynamicResource SystemAccentColorPrimary}" />
366+
<SolidColorBrush x:Key="CalendarViewSelectedBackgroundPointerOver" Color="{DynamicResource AccentFillColorSecondary}" />
365367
<SolidColorBrush x:Key="CalendarViewSelectedBorderBrush" Color="{DynamicResource SystemAccentColorPrimary}" />
366368
<SolidColorBrush x:Key="CalendarViewTodayBackground" Color="{DynamicResource SystemAccentColorPrimary}" />
367369
<SolidColorBrush x:Key="CalendarViewTodayForeground" Color="{StaticResource TextOnAccentFillColorPrimary}" />
368-
<SolidColorBrush x:Key="CalendarViewButtonForeground" Color="{StaticResource TextFillColorSecondary}" />
370+
<SolidColorBrush x:Key="CalendarViewNavigationButtonForeground" Color="{StaticResource TextFillColorPrimary}" />
369371

370372
<!-- Card / CardAction / CardColor / CardExpander -->
371373
<SolidColorBrush x:Key="CardBackground" Color="{StaticResource CardBackgroundFillColorDefault}" />

src/Wpf.Ui/Resources/Theme/HC1.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,13 @@
243243
<SolidColorBrush x:Key="CalendarViewBackground" Color="{StaticResource SystemColorWindowColor}" />
244244
<SolidColorBrush x:Key="CalendarViewBorderBrush" Color="{StaticResource SystemColorWindowTextColor}" />
245245
<SolidColorBrush x:Key="CalendarViewItemBackgroundPointerOver" Color="{StaticResource SystemColorWindowColor}" />
246+
<SolidColorBrush x:Key="CalendarViewItemBackgroundPressed" Color="{StaticResource SystemColorWindowColor}" />
246247
<SolidColorBrush x:Key="CalendarViewSelectedBackground" Color="{StaticResource SystemColorWindowColor}" />
248+
<SolidColorBrush x:Key="CalendarViewSelectedBackgroundPointerOver" Color="{DynamicResource SystemColorWindowColor}" />
247249
<SolidColorBrush x:Key="CalendarViewSelectedBorderBrush" Color="{StaticResource SystemColorHighlightColor}" />
248250
<SolidColorBrush x:Key="CalendarViewTodayBackground" Color="{StaticResource SystemColorHighlightColor}" />
249251
<SolidColorBrush x:Key="CalendarViewTodayForeground" Color="{StaticResource SystemColorHighlightTextColor}" />
250-
<SolidColorBrush x:Key="CalendarViewButtonForeground" Color="{StaticResource SystemColorButtonTextColor}" />
252+
<SolidColorBrush x:Key="CalendarViewNavigationButtonForeground" Color="{StaticResource SystemColorButtonTextColor}" />
251253

252254
<!-- Card / CardAction / CardColor / CardExpander -->
253255
<SolidColorBrush x:Key="CardBackground" Color="{StaticResource SystemColorWindowColor}" />

src/Wpf.Ui/Resources/Theme/HC2.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,13 @@
242242
<SolidColorBrush x:Key="CalendarViewBackground" Color="{StaticResource SystemColorWindowColor}" />
243243
<SolidColorBrush x:Key="CalendarViewBorderBrush" Color="{StaticResource SystemColorWindowTextColor}" />
244244
<SolidColorBrush x:Key="CalendarViewItemBackgroundPointerOver" Color="{StaticResource SystemColorWindowColor}" />
245+
<SolidColorBrush x:Key="CalendarViewItemBackgroundPressed" Color="{StaticResource SystemColorWindowColor}" />
245246
<SolidColorBrush x:Key="CalendarViewSelectedBackground" Color="{StaticResource SystemColorWindowColor}" />
247+
<SolidColorBrush x:Key="CalendarViewSelectedBackgroundPointerOver" Color="{DynamicResource SystemColorWindowColor}" />
246248
<SolidColorBrush x:Key="CalendarViewSelectedBorderBrush" Color="{StaticResource SystemColorHighlightColor}" />
247249
<SolidColorBrush x:Key="CalendarViewTodayBackground" Color="{StaticResource SystemColorHighlightColor}" />
248250
<SolidColorBrush x:Key="CalendarViewTodayForeground" Color="{StaticResource SystemColorHighlightTextColor}" />
249-
<SolidColorBrush x:Key="CalendarViewButtonForeground" Color="{StaticResource SystemColorButtonTextColor}" />
251+
<SolidColorBrush x:Key="CalendarViewNavigationButtonForeground" Color="{StaticResource SystemColorButtonTextColor}" />
250252

251253
<!-- Card / CardAction / CardColor / CardExpander -->
252254
<SolidColorBrush x:Key="CardBackground" Color="{StaticResource SystemColorWindowColor}" />

src/Wpf.Ui/Resources/Theme/HCBlack.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,13 @@
242242
<SolidColorBrush x:Key="CalendarViewBackground" Color="{StaticResource SystemColorWindowColor}" />
243243
<SolidColorBrush x:Key="CalendarViewBorderBrush" Color="{StaticResource SystemColorWindowTextColor}" />
244244
<SolidColorBrush x:Key="CalendarViewItemBackgroundPointerOver" Color="{StaticResource SystemColorWindowColor}" />
245+
<SolidColorBrush x:Key="CalendarViewItemBackgroundPressed" Color="{StaticResource SystemColorWindowColor}" />
245246
<SolidColorBrush x:Key="CalendarViewSelectedBackground" Color="{StaticResource SystemColorWindowColor}" />
247+
<SolidColorBrush x:Key="CalendarViewSelectedBackgroundPointerOver" Color="{DynamicResource SystemColorWindowColor}" />
246248
<SolidColorBrush x:Key="CalendarViewSelectedBorderBrush" Color="{StaticResource SystemColorHighlightColor}" />
247249
<SolidColorBrush x:Key="CalendarViewTodayBackground" Color="{StaticResource SystemColorHighlightColor}" />
248250
<SolidColorBrush x:Key="CalendarViewTodayForeground" Color="{StaticResource SystemColorHighlightTextColor}" />
249-
<SolidColorBrush x:Key="CalendarViewButtonForeground" Color="{StaticResource SystemColorButtonTextColor}" />
251+
<SolidColorBrush x:Key="CalendarViewNavigationButtonForeground" Color="{StaticResource SystemColorButtonTextColor}" />
250252

251253
<!-- Card / CardAction / CardColor / CardExpander -->
252254
<SolidColorBrush x:Key="CardBackground" Color="{StaticResource SystemColorWindowColor}" />

src/Wpf.Ui/Resources/Theme/HCWhite.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,13 @@
242242
<SolidColorBrush x:Key="CalendarViewBackground" Color="{StaticResource SystemColorWindowColor}" />
243243
<SolidColorBrush x:Key="CalendarViewBorderBrush" Color="{StaticResource SystemColorWindowTextColor}" />
244244
<SolidColorBrush x:Key="CalendarViewItemBackgroundPointerOver" Color="{StaticResource SystemColorWindowColor}" />
245+
<SolidColorBrush x:Key="CalendarViewItemBackgroundPressed" Color="{StaticResource SystemColorWindowColor}" />
245246
<SolidColorBrush x:Key="CalendarViewSelectedBackground" Color="{StaticResource SystemColorWindowColor}" />
247+
<SolidColorBrush x:Key="CalendarViewSelectedBackgroundPointerOver" Color="{DynamicResource SystemColorWindowColor}" />
246248
<SolidColorBrush x:Key="CalendarViewSelectedBorderBrush" Color="{StaticResource SystemColorHighlightColor}" />
247249
<SolidColorBrush x:Key="CalendarViewTodayBackground" Color="{StaticResource SystemColorHighlightColor}" />
248250
<SolidColorBrush x:Key="CalendarViewTodayForeground" Color="{StaticResource SystemColorHighlightTextColor}" />
249-
<SolidColorBrush x:Key="CalendarViewButtonForeground" Color="{StaticResource SystemColorButtonTextColor}" />
251+
<SolidColorBrush x:Key="CalendarViewNavigationButtonForeground" Color="{StaticResource SystemColorButtonTextColor}" />
250252

251253
<!-- Card / CardAction / CardColor / CardExpander -->
252254
<SolidColorBrush x:Key="CardBackground" Color="{StaticResource SystemColorWindowColor}" />

src/Wpf.Ui/Resources/Theme/Light.xaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,14 +359,16 @@
359359

360360
<!-- Calendar -->
361361
<SolidColorBrush x:Key="CalendarViewForeground" Color="{StaticResource TextFillColorPrimary}" />
362-
<SolidColorBrush x:Key="CalendarViewBackground" Color="{StaticResource AcrylicBackgroundFillColorDefault}" />
363-
<SolidColorBrush x:Key="CalendarViewBorderBrush" Color="{StaticResource SurfaceStrokeColorFlyout}" />
364-
<SolidColorBrush x:Key="CalendarViewItemBackgroundPointerOver" Color="{StaticResource ControlFillColorSecondary}" />
362+
<SolidColorBrush x:Key="CalendarViewBackground" Color="{StaticResource ControlFillColorInputActive}" />
363+
<SolidColorBrush x:Key="CalendarViewBorderBrush" Color="{StaticResource ControlStrokeColorDefault}" />
364+
<SolidColorBrush x:Key="CalendarViewItemBackgroundPointerOver" Color="{StaticResource SubtleFillColorSecondary}" />
365+
<SolidColorBrush x:Key="CalendarViewItemBackgroundPressed" Color="{StaticResource SubtleFillColorTertiary}" />
365366
<SolidColorBrush x:Key="CalendarViewSelectedBackground" Color="{DynamicResource SystemAccentColorPrimary}" />
367+
<SolidColorBrush x:Key="CalendarViewSelectedBackgroundPointerOver" Color="{DynamicResource AccentFillColorSecondary}" />
366368
<SolidColorBrush x:Key="CalendarViewSelectedBorderBrush" Color="{DynamicResource SystemAccentColorPrimary}" />
367369
<SolidColorBrush x:Key="CalendarViewTodayBackground" Color="{DynamicResource SystemAccentColorPrimary}" />
368370
<SolidColorBrush x:Key="CalendarViewTodayForeground" Color="{StaticResource TextOnAccentFillColorPrimary}" />
369-
<SolidColorBrush x:Key="CalendarViewButtonForeground" Color="{StaticResource TextFillColorSecondary}" />
371+
<SolidColorBrush x:Key="CalendarViewNavigationButtonForeground" Color="{StaticResource TextFillColorPrimary}" />
370372

371373
<!-- Card / CardAction / CardColor / CardExpander -->
372374
<SolidColorBrush x:Key="CardBackground" Color="{StaticResource CardBackgroundFillColorDefault}" />

0 commit comments

Comments
 (0)