Skip to content

Commit

Permalink
feat: WIP fix xaml updates in 11.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitism committed Oct 31, 2024
1 parent f07531a commit c15177d
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 41 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-beta1</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.6.0</Version>
<AvaloniaVersion>11.2.0</AvaloniaVersion>
<Authors>IRIHI Technology Co., Ltd.</Authors>
<RepositoryUrl>https://github.com/irihitech/Ursa.Avalonia</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
32 changes: 24 additions & 8 deletions src/Ursa.Themes.Semi/Controls/Divider.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,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 +70,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 +91,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 +112,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
37 changes: 7 additions & 30 deletions src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,13 @@
<Setter Property="ExtendClientAreaTitleBarHeightHint" Value="-1" />
<Setter Property="ExtendClientAreaToDecorationsHint" Value="True" />
<Setter Property="u:OverlayDialogHost.IsModalStatusScope" Value="True" />
<Setter Property="IsMinimizeButtonVisible">
<OnPlatform>
<On Options="Default, Windows, Linux">
<x:Boolean>True</x:Boolean>
</On>
<On Options="macOS">
<x:Boolean>False</x:Boolean>
</On>
</OnPlatform>
</Setter>
<Setter Property="IsRestoreButtonVisible">
<OnPlatform>
<On Options="Default, Windows, Linux">
<x:Boolean>True</x:Boolean>
</On>
<On Options="macOS">
<x:Boolean>False</x:Boolean>
</On>
</OnPlatform>
</Setter>
<Setter Property="IsCloseButtonVisible">
<OnPlatform>
<On Options="Default, Windows, Linux">
<x:Boolean>True</x:Boolean>
</On>
<On Options="macOS">
<x:Boolean>False</x:Boolean>
</On>
</OnPlatform>
</Setter>
<!--
<Setter Property="IsMinimizeButtonVisible" Value="{OnPlatform Default=True, Windows=True, Linux=True, macOS=False}" />
<Setter Property="IsRestoreButtonVisible" Value="{OnPlatform Default=True, Windows=True, Linux=True, macOS=False}" />
<Setter Property="IsCloseButtonVisible" Value="{OnPlatform Default=True, Windows=True, Linux=True, macOS=False}" />
-->
<Setter Property="SystemDecorations">
<OnPlatform>
<On Options="Default, Windows, macOS">
Expand Down

0 comments on commit c15177d

Please sign in to comment.