Skip to content

Commit

Permalink
Merge pull request #453 from irihitech/11.2-beta
Browse files Browse the repository at this point in the history
11.2 compatibility
  • Loading branch information
JusterZhu authored Oct 31, 2024
2 parents f07531a + 9c96ffe commit 474eb93
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 29 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>
4 changes: 2 additions & 2 deletions src/Package.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>1.4.0</Version>
<AvaloniaVersion>11.1.1</AvaloniaVersion>
<Version>1.5.0</Version>
<AvaloniaVersion>11.1.4</AvaloniaVersion>
<Authors>IRIHI Technology Co., Ltd.</Authors>
<RepositoryUrl>https://github.com/irihitech/Ursa.Avalonia</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
56 changes: 30 additions & 26 deletions src/Ursa.Themes.Semi/Controls/Divider.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,16 @@
</Design.PreviewWith>
<!-- Add Resources Here -->
<ControlTheme x:Key="DividerLeftLine" TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="{DynamicResource DividerBorderBrush}" />
<Setter Property="Height" Value="{DynamicResource SizeDividerWidth}" />
<Setter Property="MinWidth" Value="{DynamicResource SizeDividerLeftMinWidth}" />
<Setter Property="Rectangle.Fill" Value="{DynamicResource DividerBorderBrush}" />
<Setter Property="Rectangle.Height" Value="{DynamicResource SizeDividerWidth}" />
<Setter Property="Rectangle.MinWidth" Value="{DynamicResource SizeDividerLeftMinWidth}" />
<Setter Property="VerticalAlignment" Value="Center" />
</ControlTheme>

<ControlTheme x:Key="DividerRightLine" TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="{DynamicResource DividerBorderBrush}" />
<Setter Property="Height" Value="{DynamicResource SizeDividerWidth}" />
<Setter Property="MinWidth" Value="{DynamicResource SizeDividerRightMinWidth}" />
<Setter Property="VerticalAlignment" Value="Center" />
</ControlTheme>

<ControlTheme x:Key="DividerContentPresenter" TargetType="{x:Type ContentPresenter}">
<Setter Property="Content" Value="{TemplateBinding Content}" />
<Setter Property="Background" Value="{TemplateBinding Background}" />
<Setter Property="Foreground" Value="{TemplateBinding Foreground}" />
<Setter Property="ContentTemplate" Value="{TemplateBinding ContentTemplate}" />
<Setter Property="FontFamily" Value="{TemplateBinding FontFamily}" />
<Setter Property="FontWeight" Value="{TemplateBinding FontWeight}" />
<Setter Property="FontSize" Value="{TemplateBinding FontSize}" />
<Setter Property="Margin" Value="{DynamicResource ThicknessDividerTextMargin}" />
<Setter Property="Rectangle.Fill" Value="{DynamicResource DividerBorderBrush}" />
<Setter Property="Rectangle.Height" Value="{DynamicResource SizeDividerWidth}" />
<Setter Property="Rectangle.MinWidth" Value="{DynamicResource SizeDividerRightMinWidth}" />
<Setter Property="VerticalAlignment" Value="Center" />
</ControlTheme>

Expand All @@ -49,8 +37,12 @@
<Rectangle Theme="{StaticResource DividerLeftLine}" />
<ContentPresenter
Grid.Column="1"
IsVisible="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static ObjectConverters.IsNotNull}}"
Theme="{StaticResource DividerContentPresenter}" />
Content="{TemplateBinding Content}"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Margin="{DynamicResource ThicknessDividerTextMargin}"
IsVisible="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static ObjectConverters.IsNotNull}}"/>
<Rectangle Grid.Column="2" Theme="{StaticResource DividerRightLine}" />
</Grid>
</ControlTemplate>
Expand All @@ -66,8 +58,12 @@
<Rectangle Theme="{StaticResource DividerLeftLine}" />
<ContentPresenter
Grid.Column="1"
IsVisible="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static ObjectConverters.IsNotNull}}"
Theme="{StaticResource DividerContentPresenter}" />
Content="{TemplateBinding Content}"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Margin="{DynamicResource ThicknessDividerTextMargin}"
IsVisible="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static ObjectConverters.IsNotNull}}"/>
<Rectangle Grid.Column="2" Theme="{StaticResource DividerRightLine}" />
</Grid>
</ControlTemplate>
Expand All @@ -83,8 +79,12 @@
<Rectangle Theme="{StaticResource DividerLeftLine}" />
<ContentPresenter
Grid.Column="1"
IsVisible="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static ObjectConverters.IsNotNull}}"
Theme="{StaticResource DividerContentPresenter}" />
Content="{TemplateBinding Content}"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Margin="{DynamicResource ThicknessDividerTextMargin}"
IsVisible="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static ObjectConverters.IsNotNull}}"/>
<Rectangle Grid.Column="2" Theme="{StaticResource DividerRightLine}" />
</Grid>
</ControlTemplate>
Expand All @@ -100,8 +100,12 @@
<Rectangle Theme="{StaticResource DividerLeftLine}" />
<ContentPresenter
Grid.Column="1"
IsVisible="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static ObjectConverters.IsNotNull}}"
Theme="{StaticResource DividerContentPresenter}" />
Content="{TemplateBinding Content}"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Margin="{DynamicResource ThicknessDividerTextMargin}"
IsVisible="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static ObjectConverters.IsNotNull}}"/>
<Rectangle Grid.Column="2" Theme="{StaticResource DividerRightLine}" />
</Grid>
</ControlTemplate>
Expand Down

0 comments on commit 474eb93

Please sign in to comment.