mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-05-02 05:51:28 +08:00
feat: adjust TopLevel MenuItem.
This commit is contained in:
@@ -303,7 +303,8 @@
|
|||||||
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="CornerRadius" Value="{DynamicResource MenuItemCornerRadius}" />
|
<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. -->
|
<!-- 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">
|
<Setter Property="Template">
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
<Border
|
<Border
|
||||||
@@ -326,8 +327,7 @@
|
|||||||
MinWidth="{Binding $parent[MenuItem].Bounds.Width}"
|
MinWidth="{Binding $parent[MenuItem].Bounds.Width}"
|
||||||
HorizontalOffset="-8"
|
HorizontalOffset="-8"
|
||||||
IsLightDismissEnabled="True"
|
IsLightDismissEnabled="True"
|
||||||
IsOpen="{TemplateBinding IsSubMenuOpen,
|
IsOpen="{TemplateBinding IsSubMenuOpen,Mode=TwoWay}"
|
||||||
Mode=TwoWay}"
|
|
||||||
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
|
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
|
||||||
Placement="BottomEdgeAlignedLeft"
|
Placement="BottomEdgeAlignedLeft"
|
||||||
VerticalOffset="-4"
|
VerticalOffset="-4"
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
<x:Double x:Key="MenuFlyoutMaxHeight">400</x:Double>
|
<x:Double x:Key="MenuFlyoutMaxHeight">400</x:Double>
|
||||||
<x:Double x:Key="MenuFlyoutMaxWidth">600</x:Double>
|
<x:Double x:Key="MenuFlyoutMaxWidth">600</x:Double>
|
||||||
<!-- MenuItem -->
|
<!-- MenuItem -->
|
||||||
|
<Thickness x:Key="TopLevelMenuItemPadding">16 0</Thickness>
|
||||||
|
<StaticResource x:Key="TopLevelMenuItemMinHeight" ResourceKey="SemiHeightControlDefault" />
|
||||||
<Thickness x:Key="MenuItemPadding">16 8</Thickness>
|
<Thickness x:Key="MenuItemPadding">16 8</Thickness>
|
||||||
<StaticResource x:Key="MenuItemCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
<StaticResource x:Key="MenuItemCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||||
<x:Double x:Key="MenuItemSeparatorHeight">1</x:Double>
|
<x:Double x:Key="MenuItemSeparatorHeight">1</x:Double>
|
||||||
|
|||||||
Reference in New Issue
Block a user