mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 00:00:55 +08:00
feat: adjust TopLevel MenuItem.
This commit is contained in:
@@ -303,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
|
||||
@@ -326,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"
|
||||
|
||||
@@ -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