mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 08:10:48 +08:00
fix: fix Menu RepeatButton MaxHeight value.
This commit is contained in:
@@ -23,21 +23,22 @@
|
||||
BorderThickness="0"
|
||||
Command="{Binding LineUp, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
CornerRadius="0"
|
||||
MinHeight="0"
|
||||
DockPanel.Dock="Top"
|
||||
RenderTransform="{x:Null}">
|
||||
<RepeatButton.IsVisible>
|
||||
<MultiBinding
|
||||
Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}"
|
||||
ConverterParameter="0">
|
||||
<Binding Path="VerticalScrollBarVisibility"
|
||||
RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
</MultiBinding>
|
||||
</RepeatButton.IsVisible>
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Width="8"
|
||||
Height="8"
|
||||
Data="{DynamicResource MenuScrollViewerUpButtonGlyph}"
|
||||
Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" />
|
||||
</RepeatButton>
|
||||
@@ -49,20 +50,21 @@
|
||||
Command="{Binding LineDown, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
CornerRadius="0"
|
||||
DockPanel.Dock="Bottom"
|
||||
MinHeight="0"
|
||||
RenderTransform="{x:Null}">
|
||||
<RepeatButton.IsVisible>
|
||||
<MultiBinding
|
||||
Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}"
|
||||
ConverterParameter="100">
|
||||
<Binding Path="VerticalScrollBarVisibility"
|
||||
RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
</MultiBinding>
|
||||
</RepeatButton.IsVisible>
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Width="8"
|
||||
Height="8"
|
||||
Data="{DynamicResource MenuScrollViewerDownButtonGlyph}"
|
||||
Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" />
|
||||
</RepeatButton>
|
||||
@@ -287,7 +289,7 @@
|
||||
<Setter Property="Content">
|
||||
<Template>
|
||||
<Ellipse Fill="{Binding $parent[MenuItem].Foreground}"
|
||||
Margin="4" Width="8" Height="8" />
|
||||
Margin="4" Width="6" Height="6" />
|
||||
</Template>
|
||||
</Setter>
|
||||
</Style>
|
||||
@@ -297,7 +299,7 @@
|
||||
<Setter Property="Background" Value="{DynamicResource MenuItemBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource MenuItemForeground}" />
|
||||
<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. -->
|
||||
<Setter Property="Padding" Value="{DynamicResource MenuItemPadding}" />
|
||||
<Setter Property="Template">
|
||||
@@ -396,4 +398,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -1,8 +1,8 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="MenuScrollViewerUpButtonGlyph" ResourceKey="SemiIconChevronUp" />
|
||||
<StaticResource x:Key="MenuScrollViewerDownButtonGlyph" ResourceKey="SemiIconChevronDown" />
|
||||
<StaticResource x:Key="MenuScrollViewerUpButtonGlyph" ResourceKey="SemiIconCaretUp" />
|
||||
<StaticResource x:Key="MenuScrollViewerDownButtonGlyph" ResourceKey="SemiIconCaretDown" />
|
||||
<StaticResource x:Key="MenuItemExpandIconGlyph" ResourceKey="SemiIconChevronRight" />
|
||||
<StaticResource x:Key="MenuCheckGlyph" ResourceKey="SemiIconCheckBoxTick" />
|
||||
<StaticResource x:Key="MenuCheckGlyph" ResourceKey="SemiIconTick" />
|
||||
<!-- MenuFlyout -->
|
||||
<StaticResource x:Key="MenuFlyoutBorderThickness" ResourceKey="SemiBorderThicknessControl" />
|
||||
<Thickness x:Key="MenuFlyoutPadding">0 4</Thickness>
|
||||
@@ -16,7 +16,7 @@
|
||||
<StaticResource x:Key="MenuItemCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<x:Double x:Key="MenuItemSeparatorHeight">1</x:Double>
|
||||
<StaticResource x:Key="MenuItemSeparatorMargin" ResourceKey="SemiThicknessSuperTight" />
|
||||
<Thickness x:Key="MenuItemIconMargin">0 0 12 0</Thickness>
|
||||
<Thickness x:Key="MenuItemIconMargin">0 0 8 0</Thickness>
|
||||
<Thickness x:Key="MenuItemInputGestureTextMargin">4 0</Thickness>
|
||||
<Thickness x:Key="MenuItemExpandIconMargin">4 0</Thickness>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user