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