fix(ui): keep task rows without a chain relation flat
The indent column was hardcoded to 24px, so every row reserved the gutter even with no child/chain relation. Restore Auto sizing with the width back on the Border, which collapses to 0 while it is invisible. Move the step badge into column 1 with a negative margin so its desired width can never widen the Auto column (same on-screen position).
This commit is contained in:
@@ -19,10 +19,11 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Indent wrapper: col 0 = 24px child/chain indent track, col 1 = content -->
|
<!-- Indent wrapper: col 0 = 24px child/chain indent track, col 1 = content -->
|
||||||
<Grid Grid.Row="1" ColumnDefinitions="24,*">
|
<Grid Grid.Row="1" ColumnDefinitions="Auto,*">
|
||||||
|
|
||||||
<!-- Indent track (only while the parent/chain-head shares this view; orphaned rows render flat) -->
|
<!-- Indent track (only while the parent/chain-head shares this view; orphaned rows render flat).
|
||||||
<Border Grid.Column="0" VerticalAlignment="Stretch">
|
Auto + Width: collapses to 0 on rows with no chain/child relation, so those stay flat. -->
|
||||||
|
<Border Grid.Column="0" Width="24" VerticalAlignment="Stretch">
|
||||||
<Border.IsVisible>
|
<Border.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.Or}">
|
<MultiBinding Converter="{x:Static BoolConverters.Or}">
|
||||||
<Binding Path="ShowAsChild"/>
|
<Binding Path="ShowAsChild"/>
|
||||||
@@ -33,11 +34,12 @@
|
|||||||
HorizontalAlignment="Right" Margin="0,4"/>
|
HorizontalAlignment="Right" Margin="0,4"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Chain step badge: centered on the rail line, half laid over the card's left edge -->
|
<!-- Chain step badge: centered on the rail line, half laid over the card's left edge.
|
||||||
<Border Grid.Column="0" Grid.ColumnSpan="2" Classes="chain-step-badge"
|
Lives in col 1 with a negative margin so it never widens the Auto indent column. -->
|
||||||
|
<Border Grid.Column="1" Classes="chain-step-badge"
|
||||||
IsVisible="{Binding ShowAsChainMember}"
|
IsVisible="{Binding ShowAsChainMember}"
|
||||||
HorizontalAlignment="Left" VerticalAlignment="Center"
|
HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||||
Margin="16,0,0,0">
|
Margin="-8,0,0,0">
|
||||||
<TextBlock Text="{Binding ChainStep}"/>
|
<TextBlock Text="{Binding ChainStep}"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user