Petar Tasev
3 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
6 additions and
5 deletions
-
src/Avalonia.Controls/TreeViewItem.cs
-
src/Avalonia.Themes.Fluent/Controls/TreeViewItem.xaml
-
src/Avalonia.Themes.Simple/Controls/TreeViewItem.xaml
|
|
|
@ -191,13 +191,14 @@ namespace Avalonia.Controls |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (_header != null) |
|
|
|
var header = _headerPresenter ?? _header; |
|
|
|
if (header is not null) |
|
|
|
{ |
|
|
|
var m = _header.TransformToVisual(this); |
|
|
|
var m = header.TransformToVisual(this); |
|
|
|
|
|
|
|
if (m.HasValue) |
|
|
|
{ |
|
|
|
var bounds = new Rect(_header.Bounds.Size); |
|
|
|
var bounds = new Rect(header.Bounds.Size); |
|
|
|
var rect = bounds.TransformToAABB(m.Value); |
|
|
|
e.TargetRect = rect; |
|
|
|
} |
|
|
|
|
|
|
|
@ -73,7 +73,7 @@ |
|
|
|
MinHeight="{TemplateBinding MinHeight}" |
|
|
|
TemplatedControl.IsTemplateFocusTarget="True"> |
|
|
|
<Grid Name="PART_Header" |
|
|
|
ColumnDefinitions="Auto, *"> |
|
|
|
ColumnDefinitions="Auto, Auto"> |
|
|
|
<Grid.Margin> |
|
|
|
<MultiBinding Converter="{x:Static converters:TreeViewItemIndentConverter.Instance}"> |
|
|
|
<Binding Path="Level" RelativeSource="{RelativeSource TemplatedParent}" /> |
|
|
|
|
|
|
|
@ -43,7 +43,7 @@ |
|
|
|
Focusable="True" |
|
|
|
TemplatedControl.IsTemplateFocusTarget="True"> |
|
|
|
<Grid Name="PART_Header" |
|
|
|
ColumnDefinitions="16, *"> |
|
|
|
ColumnDefinitions="16, Auto"> |
|
|
|
<Grid.Margin> |
|
|
|
<MultiBinding Converter="{x:Static converters:TreeViewItemIndentConverter.Instance}"> |
|
|
|
<Binding Path="Level" RelativeSource="{RelativeSource TemplatedParent}" /> |
|
|
|
|