mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-02 15:50:49 +08:00
Merge branch 'refs/heads/main' into typesetting
# Conflicts: # src/Semi.Avalonia/Controls/Calendar.axaml # src/Semi.Avalonia/Controls/TimePicker.axaml
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:ClassModifier="internal">
|
||||
x:CompileBindings="True">
|
||||
<ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer">
|
||||
<Setter Property="DefaultFocusAdorner">
|
||||
<FocusAdornerTemplate>
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20">
|
||||
<Calendar />
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type Calendar}" TargetType="Calendar">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CalendarBackground}" />
|
||||
@@ -38,6 +43,7 @@
|
||||
VerticalAlignment="Center"
|
||||
x:DataType="x:String"
|
||||
FontSize="{DynamicResource CalendarItemWeekDayNameFontSize}"
|
||||
FontWeight="{DynamicResource CalendarItemWeekDayNameFontWeight}"
|
||||
Foreground="{DynamicResource CalendarItemWeekDayNameForeground}"
|
||||
Text="{Binding}" />
|
||||
</Template>
|
||||
@@ -58,38 +64,41 @@
|
||||
VerticalAlignment="Stretch"
|
||||
RowDefinitions="Auto,*">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
|
||||
<Button
|
||||
<RepeatButton
|
||||
Name="PART_PreviousButton"
|
||||
Grid.Column="0"
|
||||
HorizontalContentAlignment="Left"
|
||||
Padding="0"
|
||||
MinWidth="{Binding $self.MinHeight}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
Theme="{DynamicResource BorderlessRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Classes="Large"
|
||||
Data="{DynamicResource CalendarItemPreviousIconGlyph}"
|
||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||
</Button>
|
||||
</RepeatButton>
|
||||
|
||||
<Button
|
||||
Name="PART_HeaderButton"
|
||||
Grid.Column="1"
|
||||
HorizontalContentAlignment="Center"
|
||||
HorizontalAlignment="Stretch"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}" />
|
||||
|
||||
<Button
|
||||
<RepeatButton
|
||||
Name="PART_NextButton"
|
||||
Grid.Column="2"
|
||||
HorizontalContentAlignment="Left"
|
||||
Padding="0"
|
||||
MinWidth="{Binding $self.MinHeight}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
Theme="{DynamicResource BorderlessRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Classes="Large"
|
||||
Data="{DynamicResource CalendarItemNextIconGlyph}"
|
||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||
</Button>
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
<Grid
|
||||
Name="PART_MonthView"
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
Command="{Binding LineUp, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
CornerRadius="0"
|
||||
MinHeight="0"
|
||||
Padding="0 4"
|
||||
DockPanel.Dock="Top"
|
||||
RenderTransform="{x:Null}">
|
||||
<RepeatButton.IsVisible>
|
||||
@@ -49,8 +50,9 @@
|
||||
BorderThickness="0"
|
||||
Command="{Binding LineDown, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
CornerRadius="0"
|
||||
DockPanel.Dock="Bottom"
|
||||
MinHeight="0"
|
||||
Padding="0 4"
|
||||
DockPanel.Dock="Bottom"
|
||||
RenderTransform="{x:Null}">
|
||||
<RepeatButton.IsVisible>
|
||||
<MultiBinding
|
||||
@@ -301,7 +303,8 @@
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource MenuItemCornerRadius}" />
|
||||
<!-- Narrow padding should be used for mouse input, when non-narrow one should be used for touch input in future. -->
|
||||
<Setter Property="Padding" Value="{DynamicResource MenuItemPadding}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource TopLevelMenuItemPadding}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource TopLevelMenuItemMinHeight}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
@@ -324,8 +327,7 @@
|
||||
MinWidth="{Binding $parent[MenuItem].Bounds.Width}"
|
||||
HorizontalOffset="-8"
|
||||
IsLightDismissEnabled="True"
|
||||
IsOpen="{TemplateBinding IsSubMenuOpen,
|
||||
Mode=TwoWay}"
|
||||
IsOpen="{TemplateBinding IsSubMenuOpen,Mode=TwoWay}"
|
||||
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
|
||||
Placement="BottomEdgeAlignedLeft"
|
||||
VerticalOffset="-4"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<Setter Property="Width" Value="242" />
|
||||
<Setter Property="MinWidth" Value="242" />
|
||||
<Setter Property="MaxHeight" Value="300" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
@@ -158,7 +159,7 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource DateTimePickerButtonBorderThickness}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource DateTimePickerButtonCornerRadius}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<StaticResource x:Key="CalendarBorderThickness" ResourceKey="SemiBorderThicknessControl" />
|
||||
<StaticResource x:Key="CalendarCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
|
||||
<GridLength x:Key="CalendarItemWeekDayNameHeight">40</GridLength>
|
||||
<StaticResource x:Key="CalendarItemWeekDayNameFontWeight" ResourceKey="SemiFontWeightBold" />
|
||||
<StaticResource x:Key="CalendarItemPreviousIconGlyph" ResourceKey="SemiIconChevronLeft" />
|
||||
<StaticResource x:Key="CalendarItemNextIconGlyph" ResourceKey="SemiIconChevronRight" />
|
||||
<StaticResource x:Key="CalendarItemCalendarButtonSelectedFontWeight" ResourceKey="SemiFontWeightBold" />
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
<x:Double x:Key="MenuFlyoutMaxHeight">400</x:Double>
|
||||
<x:Double x:Key="MenuFlyoutMaxWidth">600</x:Double>
|
||||
<!-- MenuItem -->
|
||||
<Thickness x:Key="TopLevelMenuItemPadding">16 0</Thickness>
|
||||
<StaticResource x:Key="TopLevelMenuItemMinHeight" ResourceKey="SemiHeightControlDefault" />
|
||||
<Thickness x:Key="MenuItemPadding">16 8</Thickness>
|
||||
<StaticResource x:Key="MenuItemCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<x:Double x:Key="MenuItemSeparatorHeight">1</x:Double>
|
||||
|
||||
Reference in New Issue
Block a user