fix: using DynamicResource for IconButtonInnerSpacing. (#886)
This commit is contained in:
committed by
GitHub
Unverified
parent
0ad5d3abb7
commit
42ad3b8888
@@ -121,13 +121,13 @@
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Orientation="Horizontal"
|
||||
Spacing="{StaticResource IconButtonInnerSpacing}">
|
||||
Spacing="{DynamicResource IconButtonInnerSpacing}">
|
||||
<Panel Name="PART_IconRoot">
|
||||
<Panel.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.Or}">
|
||||
<Binding Path="(u:IconButton.IsLoading)" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="(u:IconButton.Icon)" RelativeSource="{RelativeSource TemplatedParent}"
|
||||
Converter="{x:Static ObjectConverters.IsNotNull}" />
|
||||
Converter="{x:Static ObjectConverters.IsNotNull}" />
|
||||
</MultiBinding>
|
||||
</Panel.IsVisible>
|
||||
<ContentPresenter
|
||||
@@ -166,7 +166,7 @@
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTheme x:Key="BaseIconButton" TargetType="ContentControl">
|
||||
<ControlTheme x:Key="BaseIconButton" TargetType="u:IconButton">
|
||||
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||
@@ -271,7 +271,7 @@
|
||||
<Setter Property="FocusAdorner">
|
||||
<FocusAdornerTemplate>
|
||||
<Border Theme="{DynamicResource AdornerLayerBorder}"
|
||||
Classes="Solid" />
|
||||
Classes="Solid" />
|
||||
</FocusAdornerTemplate>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid
|
||||
ColumnDefinitions="*, Auto"
|
||||
ColumnSpacing="{StaticResource IconButtonInnerSpacing}">
|
||||
ColumnSpacing="{DynamicResource IconButtonInnerSpacing}">
|
||||
<ReversibleStackPanel
|
||||
Name="{x:Static u:IconButton.PART_RootPanel}"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Orientation="Horizontal"
|
||||
Spacing="{StaticResource IconButtonInnerSpacing}">
|
||||
Spacing="{DynamicResource IconButtonInnerSpacing}">
|
||||
<Panel Name="PART_IconRoot">
|
||||
<Panel.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.Or}">
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<x:Double x:Key="IconButtonInnerSpacing">8</x:Double>
|
||||
<StaticResource x:Key="IconButtonInnerSpacing" ResourceKey="SemiSpacingTight"/>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user