Skip to content

Commit

Permalink
Merge pull request #447 from irihitech/11.2-test
Browse files Browse the repository at this point in the history
11.2.0
  • Loading branch information
zdpcdt authored Oct 31, 2024
2 parents ae07419 + 36d140a commit dcb97ec
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 15 deletions.
2 changes: 1 addition & 1 deletion demo/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.1.3</AvaloniaVersion>
<AvaloniaVersion>11.2.0</AvaloniaVersion>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions demo/Semi.Avalonia.Demo/Pages/TimePickerDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
mc:Ignorable="d">
<StackPanel Spacing="20">
<TimePicker />
<TimePicker UseSeconds="True" />
<TimePicker Classes="ClearButton" />
<TimePicker MinuteIncrement="15" />
<TimePicker ClockIdentifier="24HourClock" />
Expand Down
4 changes: 2 additions & 2 deletions src/Package.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<TargetFrameworks>net6.0;net8.0;netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Version>11.1.0.5-beta1</Version>
<Version>11.2.0.0</Version>
<Authors>IRIHI Technology Co., Ltd.</Authors>
<Description>Avalonia Theme inspired by Semi Design.</Description>
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>irihi.png</PackageIcon>
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
<AvaloniaVersion>11.1.0</AvaloniaVersion>
<AvaloniaVersion>11.2.0</AvaloniaVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
9 changes: 4 additions & 5 deletions src/Semi.Avalonia/Controls/Carousel.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
BringIntoViewOnFocusChange="True"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden">
<ItemsPresenter
Expand Down Expand Up @@ -65,8 +66,7 @@
Name="Container"
Width="{DynamicResource CarouselIndicatorLineWidth}"
Height="{DynamicResource CarouselIndicatorLineHeight}"
Background="{TemplateBinding Background}">
</Border>
Background="{TemplateBinding Background}" />
</Border>
</Panel>
</ControlTemplate>
Expand All @@ -89,8 +89,7 @@
<ControlTemplate TargetType="ListBoxItem">
<Panel Background="Transparent">
<Border Padding="2,0" Background="Transparent">
<Border Width="{DynamicResource CarouselIndicatorColumnarWidth}"
Height="{DynamicResource CarouselIndicatorColumnarSelectedHeight}">
<Border Width="{DynamicResource CarouselIndicatorColumnarWidth}" Height="{DynamicResource CarouselIndicatorColumnarSelectedHeight}">
<Rectangle
Name="Container"
Width="{DynamicResource CarouselIndicatorColumnarWidth}"
Expand All @@ -99,7 +98,7 @@
Fill="{TemplateBinding Background}">
<Rectangle.Transitions>
<Transitions>
<DoubleTransition Property="Height" Duration="0:0:0.2"></DoubleTransition>
<DoubleTransition Property="Height" Duration="0:0:0.2" />
</Transitions>
</Rectangle.Transitions>
</Rectangle>
Expand Down
1 change: 1 addition & 0 deletions src/Semi.Avalonia/Controls/ContextMenu.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<Setter Property="ContextMenu.MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" />
<Setter Property="ContextMenu.MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" />
<Setter Property="ContextMenu.Padding" Value="{DynamicResource MenuFlyoutPadding}" />
<Setter Property="Focusable" Value="True"></Setter>
<Setter Property="ContextMenu.HorizontalAlignment" Value="Stretch" />
<Setter Property="TextBlock.FontWeight" Value="Normal" />
<Setter Property="ContextMenu.WindowManagerAddShadowHint" Value="False" />
Expand Down
1 change: 0 additions & 1 deletion src/Semi.Avalonia/Controls/SelectableTextBlock.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<MenuFlyout x:Key="SelectableTextBlockContextFlyout" Placement="Bottom">
<MenuItem
x:Name="SelectableTextBlockContextFlyoutCopyItem"
Command="{Binding $parent[SelectableTextBlock].Copy}"
Header="{DynamicResource STRING_MENU_COPY}"
InputGesture="{x:Static TextBox.CopyGesture}"
Expand Down
3 changes: 0 additions & 3 deletions src/Semi.Avalonia/Controls/TextBox.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@
x:CompileBindings="True">
<MenuFlyout x:Key="DefaultTextBoxContextFlyout" Placement="Bottom">
<MenuItem
x:Name="TextBoxContextFlyoutCutItem"
Command="{Binding $parent[TextBox].Cut}"
Header="{DynamicResource STRING_MENU_CUT}"
InputGesture="{x:Static TextBox.CutGesture}"
IsEnabled="{Binding $parent[TextBox].CanCut}" />
<MenuItem
x:Name="TextBoxContextFlyoutCopyItem"
Command="{Binding $parent[TextBox].Copy}"
Header="{DynamicResource STRING_MENU_COPY}"
InputGesture="{x:Static TextBox.CopyGesture}"
IsEnabled="{Binding $parent[TextBox].CanCopy}" />
<MenuItem
x:Name="TextBoxContextFlyoutPasteItem"
Command="{Binding $parent[TextBox].Paste}"
Header="{DynamicResource STRING_MENU_PASTE}"
InputGesture="{x:Static TextBox.PasteGesture}"
Expand Down
44 changes: 43 additions & 1 deletion src/Semi.Avalonia/Controls/TimePicker.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,20 @@
<RepeatButton Name="PART_MinuteUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_MinuteDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>

<Panel Name="PART_SecondHost" Grid.Column="4">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_SecondSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Second"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_SecondUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_SecondDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>

<Panel Name="PART_PeriodHost" Grid.Column="4">
<Panel Name="PART_PeriodHost" Grid.Column="6">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_PeriodSelector"
Expand All @@ -81,6 +93,13 @@
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Rectangle
Name="PART_ThirdSpacer"
Grid.Column="5"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid>

<Grid
Expand Down Expand Up @@ -216,6 +235,29 @@
Grid.Column="4"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<TextBlock
x:Name="PART_SecondTextBlock"
Padding="12,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}"
Text="{DynamicResource STRING_TIMEPICKER_SECOND_TEXT}"/>
</Border>

<Rectangle
Name="PART_ThirdColumnDivider"
Grid.Column="5"
Width="1"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />

<Border
x:Name="PART_FourthPickerHost"
Grid.Column="6"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<TextBlock
x:Name="PART_PeriodTextBlock"
Padding="12,0"
Expand Down
3 changes: 2 additions & 1 deletion src/Semi.Avalonia/Locale/en-us.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<!-- TimePicker -->
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">hour</x:String>
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">minute</x:String>
<!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">second</x:String>
<!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_MENU_CUT">Cut</x:String>
<x:String x:Key="STRING_MENU_COPY">Copy</x:String>
<x:String x:Key="STRING_MENU_PASTE">Paste</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Semi.Avalonia/Locale/ja-jp.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<!-- TimePicker -->
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">時</x:String>
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">分</x:String>
<x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">秒</x:String>
<!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_MENU_CUT">切り取り</x:String>
<x:String x:Key="STRING_MENU_COPY">コピー</x:String>
Expand Down
3 changes: 2 additions & 1 deletion src/Semi.Avalonia/Locale/zh-cn.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<!-- TimePicker -->
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">时</x:String>
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">分</x:String>
<!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">秒</x:String>
<!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_MENU_CUT">剪切</x:String>
<x:String x:Key="STRING_MENU_COPY">复制</x:String>
<x:String x:Key="STRING_MENU_PASTE">粘贴</x:String>
Expand Down

0 comments on commit dcb97ec

Please sign in to comment.