feat: add generic thickness/cornerradius converter.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:u="https://irihi.tech/ursa">
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:converters="clr-namespace:Ursa.Converters;assembly=Ursa">
|
||||
<ControlTheme x:Key="{x:Type u:DualBadge}" TargetType="u:DualBadge">
|
||||
<Setter Property="u:DualBadge.CornerRadius" Value="{DynamicResource DualBadgeDefaultCornerRadius}" />
|
||||
<Setter Property="u:DualBadge.FontSize" Value="{DynamicResource DualBadgeDefaultFontSize}" />
|
||||
@@ -30,10 +31,9 @@
|
||||
Name="{x:Static u:DualBadge.PART_Icon}"
|
||||
Width="14"
|
||||
Height="14"
|
||||
Margin="2 0 0 0"
|
||||
IsVisible="{TemplateBinding Icon,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
Foreground="{TemplateBinding IconForeground}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Margin="{TemplateBinding Padding, Converter={x:Static converters:ThicknessExcludeConverter.Right}}"
|
||||
Content="{TemplateBinding Icon}"
|
||||
ContentTemplate="{TemplateBinding IconTemplate}" />
|
||||
<ContentPresenter
|
||||
@@ -41,7 +41,7 @@
|
||||
TextElement.FontSize="{TemplateBinding FontSize}"
|
||||
IsVisible="{TemplateBinding Header,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
Foreground="{TemplateBinding HeaderForeground}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}" />
|
||||
</DockPanel>
|
||||
@@ -84,7 +84,6 @@
|
||||
BasedOn="{StaticResource {x:Type u:DualBadge}}"
|
||||
TargetType="u:DualBadge">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="Padding" Value="12 6" />
|
||||
|
||||
<Setter Property="Padding" Value="6 6" />
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="../Package.props"/>
|
||||
<Import Project="../Package.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
@@ -13,11 +13,11 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ursa\Ursa.csproj"/>
|
||||
<ProjectReference Include="..\Ursa\Ursa.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user