feat: improve TreeViewItem padding.
This commit is contained in:
parent
6885575c85
commit
016160dee8
@ -1,9 +1,13 @@
|
|||||||
<UserControl
|
<UserControl
|
||||||
x:Class="Semi.Avalonia.Demo.Pages.TreeViewDemo" xmlns="https://github.com/avaloniaui"
|
x:Class="Semi.Avalonia.Demo.Pages.TreeViewDemo"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="450"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
d:DesignWidth="800" mc:Ignorable="d">
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
<Panel>
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<Panel HorizontalAlignment="Left">
|
||||||
<TreeView>
|
<TreeView>
|
||||||
<TreeViewItem Header="Level 1">
|
<TreeViewItem Header="Level 1">
|
||||||
<TreeViewItem Header="Level 2" />
|
<TreeViewItem Header="Level 2" />
|
||||||
|
@ -93,7 +93,6 @@
|
|||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type TreeViewItem}" TargetType="TreeViewItem">
|
<ControlTheme x:Key="{x:Type TreeViewItem}" TargetType="TreeViewItem">
|
||||||
<Setter Property="TreeViewItem.Padding" Value="0" />
|
|
||||||
<Setter Property="TreeViewItem.Background" Value="{DynamicResource TreeViewItemDefaultBackground}" />
|
<Setter Property="TreeViewItem.Background" Value="{DynamicResource TreeViewItemDefaultBackground}" />
|
||||||
<Setter Property="TreeViewItem.Foreground" Value="{DynamicResource TreeViewItemDefaultForeground}" />
|
<Setter Property="TreeViewItem.Foreground" Value="{DynamicResource TreeViewItemDefaultForeground}" />
|
||||||
<Setter Property="TreeViewItem.CornerRadius" Value="3" />
|
<Setter Property="TreeViewItem.CornerRadius" Value="3" />
|
||||||
|
@ -21,5 +21,5 @@
|
|||||||
<SolidColorBrush x:Key="TreeViewItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
<SolidColorBrush x:Key="TreeViewItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
||||||
|
|
||||||
<Thickness x:Key="TreeViewItemIconMargin">8 0</Thickness>
|
<Thickness x:Key="TreeViewItemIconMargin">8 0</Thickness>
|
||||||
<Thickness x:Key="TreeViewItemPadding">0 4 0 4</Thickness>
|
<Thickness x:Key="TreeViewItemPadding">0 4 8 4</Thickness>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
@ -21,5 +21,5 @@
|
|||||||
<SolidColorBrush x:Key="TreeViewItemSelectedDisabledBackground" Opacity="0.02" Color="#2E3238" />
|
<SolidColorBrush x:Key="TreeViewItemSelectedDisabledBackground" Opacity="0.02" Color="#2E3238" />
|
||||||
|
|
||||||
<Thickness x:Key="TreeViewItemIconMargin">8 0</Thickness>
|
<Thickness x:Key="TreeViewItemIconMargin">8 0</Thickness>
|
||||||
<Thickness x:Key="TreeViewItemPadding">0 4 0 4</Thickness>
|
<Thickness x:Key="TreeViewItemPadding">0 4 8 4</Thickness>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user