Compare commits

...

4 Commits

6 changed files with 31 additions and 13 deletions

View File

@@ -2,9 +2,10 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Design.PreviewWith>
<Border Padding="20">
<StackPanel Margin="20">
<DatePickerPresenter />
</Border>
<DatePicker Width="500" />
</StackPanel>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter">
<Setter Property="Width" Value="296" />
@@ -141,6 +142,7 @@
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonDefaultHeight}" />
<Setter Property="MinWidth" Value="296" />
<Setter Property="Template">
<ControlTemplate TargetType="DatePicker">
<DataValidationErrors>
@@ -152,8 +154,8 @@
Name="PART_FlyoutButton"
Grid.Column="0"
Grid.ColumnSpan="2"
Width="298"
MinWidth="298"
MinWidth="{TemplateBinding MinWidth}"
MaxWidth="{TemplateBinding MaxWidth}"
MinHeight="{TemplateBinding MinHeight}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"

View File

@@ -54,6 +54,7 @@
MinWidth="{StaticResource ScrollBarThickness}"
VerticalAlignment="Center"
Focusable="False"
AutomationProperties.Name="Column left"
Theme="{StaticResource ScrollBarRepeatButton}">
<PathIcon
Theme="{StaticResource InnerPathIcon}"
@@ -76,6 +77,7 @@
VerticalAlignment="Stretch"
CornerRadius="0"
Focusable="False"
AutomationProperties.Name="Page left"
Theme="{StaticResource ScrollBarRepeatButton}" />
</Track.DecreaseButton>
<Track.IncreaseButton>
@@ -86,9 +88,10 @@
VerticalAlignment="Stretch"
CornerRadius="0"
Focusable="False"
AutomationProperties.Name="Page right"
Theme="{StaticResource ScrollBarRepeatButton}" />
</Track.IncreaseButton>
<Thumb Name="thumb" />
<Thumb Name="thumb" AutomationProperties.Name="Position" />
</Track>
<RepeatButton
Name="PART_LineDownButton"
@@ -97,6 +100,7 @@
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Focusable="False"
AutomationProperties.Name="Column right"
Theme="{DynamicResource ScrollBarRepeatButton}">
<PathIcon
Theme="{DynamicResource InnerPathIcon}"
@@ -124,6 +128,7 @@
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Focusable="False"
AutomationProperties.Name="Line up"
Theme="{StaticResource ScrollBarRepeatButton}">
<PathIcon
Theme="{StaticResource InnerPathIcon}"
@@ -147,6 +152,7 @@
VerticalAlignment="Stretch"
CornerRadius="0"
Focusable="False"
AutomationProperties.Name="Page up"
Theme="{StaticResource ScrollBarRepeatButton}" />
</Track.DecreaseButton>
<Track.IncreaseButton>
@@ -157,9 +163,10 @@
VerticalAlignment="Stretch"
CornerRadius="0"
Focusable="False"
AutomationProperties.Name="Page down"
Theme="{StaticResource ScrollBarRepeatButton}" />
</Track.IncreaseButton>
<Thumb Name="thumb" />
<Thumb Name="thumb" AutomationProperties.Name="Position" />
</Track>
<RepeatButton
Name="PART_LineDownButton"
@@ -168,6 +175,7 @@
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Focusable="False"
AutomationProperties.Name="Line down"
Theme="{StaticResource ScrollBarRepeatButton}">
<PathIcon
Theme="{StaticResource InnerPathIcon}"

View File

@@ -2,7 +2,10 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<MenuFlyout x:Key="SelectableTextBlockContextFlyout" Placement="Bottom">
<MenuFlyout
x:Key="SelectableTextBlockContextFlyout"
ShowMode="{OnFormFactor Desktop=Standard, Mobile=Transient}"
Placement="Bottom">
<MenuItem
Command="{Binding $parent[SelectableTextBlock].Copy}"
Header="{DynamicResource STRING_MENU_COPY}"

View File

@@ -1,7 +1,10 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<MenuFlyout x:Key="DefaultTextBoxContextFlyout" Placement="Bottom">
<MenuFlyout
x:Key="DefaultTextBoxContextFlyout"
ShowMode="{OnFormFactor Desktop=Standard, Mobile=Transient}"
Placement="Bottom">
<MenuItem
Command="{Binding $parent[TextBox].Cut}"
Header="{DynamicResource STRING_MENU_CUT}"

View File

@@ -2,9 +2,10 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Design.PreviewWith>
<Border Padding="20">
<StackPanel Margin="20">
<TimePickerPresenter />
</Border>
<TimePicker UseSeconds="True" Width="500" />
</StackPanel>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type TimePickerPresenter}" TargetType="TimePickerPresenter">
<Setter Property="Width" Value="242" />
@@ -163,6 +164,7 @@
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonDefaultHeight}" />
<Setter Property="MinWidth" Value="242" />
<Setter Property="Template">
<ControlTemplate>
<DataValidationErrors>
@@ -174,8 +176,8 @@
Name="PART_FlyoutButton"
Grid.Column="0"
Grid.ColumnSpan="2"
Width="242"
MinWidth="242"
MinWidth="{TemplateBinding MinWidth}"
MaxWidth="{TemplateBinding MaxWidth}"
MinHeight="{TemplateBinding MinHeight}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"

View File

@@ -67,7 +67,7 @@
<FontWeight x:Key="SemiFontWeightRegular">400</FontWeight> <!-- 字重 - 常规 -->
<FontWeight x:Key="SemiFontWeightBold">600</FontWeight> <!-- 字重 - 粗 -->
<FontFamily x:Key="SemiFontFamilyRegular">
Inter, -apple-system, BlinkMacSystemFont, PingFang SC,
fonts:Inter#Inter, Inter, -apple-system, BlinkMacSystemFont, PingFang SC,
Microsoft YaHei, Segoe UI, Hiragino Sans GB, Helvetica Neue,
Helvetica, Arial, sans-serif
</FontFamily>