Browse Source

fix simple style

pull/21311/head
timunie 2 weeks ago
parent
commit
41711788fb
  1. 7
      src/Avalonia.Themes.Simple/Controls/CalendarItem.xaml
  2. 2
      src/Avalonia.Themes.Simple/Controls/CalendarWeekNumberLabel.xaml

7
src/Avalonia.Themes.Simple/Controls/CalendarItem.xaml

@ -176,12 +176,5 @@
<Style Selector="^:calendardisabled /template/ Rectangle#DisabledVisual">
<Setter Property="IsVisible" Value="True" />
</Style>
<!-- When week numbers are visible the MonthView is wider than the YearView.
Lock CalendarItem's own MinWidth so the size stays stable when switching
between month and year/decade views.
37px per CalendarButton × 4 cols = 148 + the week-number column (~30px) -->
<Style Selector="^:showweeknumbers">
<Setter Property="MinWidth" Value="200" />
</Style>
</ControlTheme>
</ResourceDictionary>

2
src/Avalonia.Themes.Simple/Controls/CalendarWeekNumberLabel.xaml

@ -3,8 +3,6 @@
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type CalendarWeekNumberLabel}" TargetType="CalendarWeekNumberLabel">
<Setter Property="Margin" Value="0,4,0,4" />
<Setter Property="Padding" Value="4,0,6,0" />
<Setter Property="FontSize" Value="9.5" />
<Setter Property="FontStyle" Value="Italic" />
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundLowBrush}" />

Loading…
Cancel
Save