mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-02 15:50:49 +08:00
feat: replace discrete Icon Size.
This commit is contained in:
@@ -272,8 +272,8 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="InnerIconButton" TargetType="Button">
|
||||
<Setter Property="Width" Value="16" />
|
||||
<Setter Property="Height" Value="16" />
|
||||
<Setter Property="Width" Value="{DynamicResource SemiWidthIconMedium}" />
|
||||
<Setter Property="Height" Value="{DynamicResource SemiWidthIconMedium}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerForeground}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
|
||||
@@ -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">
|
||||
<DatePickerPresenter />
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter">
|
||||
<Setter Property="Width" Value="296" />
|
||||
<Setter Property="MinWidth" Value="296" />
|
||||
@@ -91,8 +96,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
@@ -106,8 +110,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource DateTimePickerDismissGlyph}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
|
||||
@@ -115,8 +115,8 @@
|
||||
<Setter Property="Content">
|
||||
<Template>
|
||||
<PathIcon
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="ExtraSmall"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="{DynamicResource DateTimePickerButtonUpGlyph}" />
|
||||
@@ -136,8 +136,8 @@
|
||||
<Setter Property="Content">
|
||||
<Template>
|
||||
<PathIcon
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="ExtraSmall"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="{DynamicResource DateTimePickerButtonDownGlyph}" />
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
</MultiBinding>
|
||||
</RepeatButton.IsVisible>
|
||||
<PathIcon
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="ExtraSmall"
|
||||
Data="{DynamicResource MenuScrollViewerUpButtonGlyph}"
|
||||
Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" />
|
||||
</RepeatButton>
|
||||
@@ -63,8 +63,8 @@
|
||||
</MultiBinding>
|
||||
</RepeatButton.IsVisible>
|
||||
<PathIcon
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="ExtraSmall"
|
||||
Data="{DynamicResource MenuScrollViewerDownButtonGlyph}"
|
||||
Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" />
|
||||
</RepeatButton>
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="InnerPathIcon" TargetType="PathIcon">
|
||||
<Setter Property="Height" Value="16" />
|
||||
<Setter Property="Width" Value="16" />
|
||||
<Setter Property="Width" Value="{StaticResource SemiWidthIconMedium}" />
|
||||
<Setter Property="Height" Value="{StaticResource SemiWidthIconMedium}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="PathIcon">
|
||||
@@ -48,20 +48,20 @@
|
||||
<Setter Property="Fill" Value="{TemplateBinding BorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^.ExtraSmall">
|
||||
<Setter Property="Height" Value="8" />
|
||||
<Setter Property="Width" Value="8" />
|
||||
<Setter Property="Width" Value="{StaticResource SemiWidthIconExtraSmall}" />
|
||||
<Setter Property="Height" Value="{StaticResource SemiWidthIconExtraSmall}" />
|
||||
</Style>
|
||||
<Style Selector="^.Small">
|
||||
<Setter Property="Height" Value="12" />
|
||||
<Setter Property="Width" Value="12" />
|
||||
<Setter Property="Width" Value="{StaticResource SemiWidthIconSmall}" />
|
||||
<Setter Property="Height" Value="{StaticResource SemiWidthIconSmall}" />
|
||||
</Style>
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="Height" Value="20" />
|
||||
<Setter Property="Width" Value="20" />
|
||||
<Setter Property="Width" Value="{StaticResource SemiWidthIconLarge}" />
|
||||
<Setter Property="Height" Value="{StaticResource SemiWidthIconLarge}" />
|
||||
</Style>
|
||||
<Style Selector="^.ExtraLarge">
|
||||
<Setter Property="Height" Value="24" />
|
||||
<Setter Property="Width" Value="24" />
|
||||
<Setter Property="Width" Value="{StaticResource SemiWidthIconExtraLarge}" />
|
||||
<Setter Property="Height" Value="{StaticResource SemiWidthIconExtraLarge}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -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">
|
||||
<TimePickerPresenter />
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type TimePickerPresenter}" TargetType="TimePickerPresenter">
|
||||
<Setter Property="Width" Value="242" />
|
||||
<Setter Property="MinWidth" Value="242" />
|
||||
@@ -112,8 +117,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
@@ -127,8 +131,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource DateTimePickerDismissGlyph}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="DateTimePickerButtonUpGlyph" ResourceKey="SemiIconCaretUp" />
|
||||
<StaticResource x:Key="DateTimePickerButtonDownGlyph" ResourceKey="SemiIconCaretDown" />
|
||||
<StaticResource x:Key="DateTimePickerButtonUpGlyph" ResourceKey="SemiIconTriangleUp" />
|
||||
<StaticResource x:Key="DateTimePickerButtonDownGlyph" ResourceKey="SemiIconTriangleDown" />
|
||||
<StaticResource x:Key="DateTimePickerAcceptGlyph" ResourceKey="SemiIconTick" />
|
||||
<StaticResource x:Key="DateTimePickerDismissGlyph" ResourceKey="SemiIconClose" />
|
||||
<StaticResource x:Key="DateTimePickerPopupCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="MenuScrollViewerUpButtonGlyph" ResourceKey="SemiIconCaretUp" />
|
||||
<StaticResource x:Key="MenuScrollViewerDownButtonGlyph" ResourceKey="SemiIconCaretDown" />
|
||||
<StaticResource x:Key="MenuScrollViewerUpButtonGlyph" ResourceKey="SemiIconTriangleUp" />
|
||||
<StaticResource x:Key="MenuScrollViewerDownButtonGlyph" ResourceKey="SemiIconTriangleDown" />
|
||||
<StaticResource x:Key="MenuItemExpandIconGlyph" ResourceKey="SemiIconChevronRight" />
|
||||
<StaticResource x:Key="MenuCheckGlyph" ResourceKey="SemiIconTick" />
|
||||
<!-- MenuFlyout -->
|
||||
|
||||
Reference in New Issue
Block a user