style(ui): keep child row highlight clear of the folder guide line

This commit is contained in:
mika kuns
2026-09-30 08:39:20 +02:00
parent 27d2b1d8ef
commit 3e2d5bab6a
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -868,7 +868,7 @@
</Style> </Style>
<!-- Folder tree rows sit tighter than the smart lists — a deep tree gets long fast. --> <!-- Folder tree rows sit tighter than the smart lists — a deep tree gets long fast. -->
<Style Selector="Border.list-item.tree-row"> <Style Selector="Border.list-item.tree-row">
<Setter Property="Padding" Value="10,4" /> <Setter Property="Padding" Value="4,4,10,4" />
</Style> </Style>
<Style Selector="Border.list-item:pointerover"> <Style Selector="Border.list-item:pointerover">
<Setter Property="Background" Value="{StaticResource Surface2Brush}" /> <Setter Property="Background" Value="{StaticResource Surface2Brush}" />
@@ -69,7 +69,7 @@
Background="{DynamicResource AccentBrush}" Background="{DynamicResource AccentBrush}"
CornerRadius="1" CornerRadius="1"
HorizontalAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Center"
Margin="-8,0,0,0"/> Margin="-2,0,0,0"/>
</Border> </Border>
<!-- Icon (list-settings → Icon tab; "Folder" when unset) --> <!-- Icon (list-settings → Icon tab; "Folder" when unset) -->
<PathIcon Grid.Column="1" Classes="list-icon" <PathIcon Grid.Column="1" Classes="list-icon"
@@ -144,11 +144,12 @@
</Grid> </Grid>
</Border> </Border>
<!-- Guide line drops from under the chevron's centre (padding 10 + half the 9px glyph). --> <!-- Guide line drops from under the chevron's centre (tree-row padding 4 + half the 9px
glyph); children start past it so their highlight never touches the line. -->
<Panel IsVisible="{Binding !IsCollapsed}"> <Panel IsVisible="{Binding !IsCollapsed}">
<Border Width="1" HorizontalAlignment="Left" Margin="14,0,0,4" <Border Width="1" HorizontalAlignment="Left" Margin="8,0,0,4"
Background="{DynamicResource LineBrush}" IsHitTestVisible="False"/> Background="{DynamicResource LineBrush}" IsHitTestVisible="False"/>
<ItemsControl ItemsSource="{Binding Children}" Margin="12,0,0,0"/> <ItemsControl ItemsSource="{Binding Children}" Margin="14,0,0,0"/>
</Panel> </Panel>
</StackPanel> </StackPanel>