fix: wrong column indentation on right side of Interactive Rebase window, for wide commit messages (#764)

This commit is contained in:
leo 2024-11-29 19:00:53 +08:00
parent f028513d49
commit e65ac18afc
No known key found for this signature in database

View file

@ -65,6 +65,7 @@
<Setter Property="Margin" Value="0"/> <Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/> <Setter Property="Padding" Value="0"/>
<Setter Property="Height" Value="28"/> <Setter Property="Height" Value="28"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
</Style> </Style>
</ListBox.Styles> </ListBox.Styles>
@ -76,7 +77,7 @@
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate DataType="vm:InteractiveRebaseItem"> <DataTemplate DataType="vm:InteractiveRebaseItem">
<Grid ColumnDefinitions="16,110,*,140,96,156,32,32"> <Grid ColumnDefinitions="16,110,*,456" ClipToBounds="True">
<!-- Drag & Drop Anchor --> <!-- Drag & Drop Anchor -->
<Border Grid.Column="0" Background="Transparent" <Border Grid.Column="0" Background="Transparent"
Loaded="OnSetupRowHeaderDragDrop" Loaded="OnSetupRowHeaderDragDrop"
@ -187,40 +188,42 @@
<TextBlock Grid.Column="1" Classes="primary" Margin="0,0,4,0" Text="{Binding Subject}"/> <TextBlock Grid.Column="1" Classes="primary" Margin="0,0,4,0" Text="{Binding Subject}"/>
</Grid> </Grid>
<!-- Author --> <Grid Grid.Column="3" ColumnDefinitions="32,108,96,156,32,32" IsHitTestVisible="False" ClipToBounds="True">
<Grid Grid.Column="3" ColumnDefinitions="Auto,*" Width="140" ClipToBounds="True"> <!-- Author Avatar -->
<v:Avatar Grid.Column="0" <v:Avatar Grid.Column="0"
Width="16" Height="16" Width="16" Height="16"
Margin="8,0,0,0" Margin="8,0,0,0"
VerticalAlignment="Center" VerticalAlignment="Center"
IsHitTestVisible="False"
User="{Binding Commit.Author}"/> User="{Binding Commit.Author}"/>
<!-- Author Name -->
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Classes="primary" Classes="primary"
MaxWidth="90"
Margin="6,0,12,0" Margin="6,0,12,0"
Text="{Binding Commit.Author.Name}" Text="{Binding Commit.Author.Name}"
HorizontalAlignment="Left"/> HorizontalAlignment="Left"/>
<!-- Commit SHA -->
<Border Grid.Column="2" ClipToBounds="True">
<TextBlock Classes="primary"
Text="{Binding Commit.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}"
HorizontalAlignment="Center"/>
</Border>
<!-- Commit Time -->
<TextBlock Grid.Column="3" Classes="primary" Text="{Binding Commit.CommitterTimeStr}" Margin="8,0"/>
<!-- MoveUp Button -->
<Button Grid.Column="4" Classes="icon_button" Click="OnMoveItemUp" ToolTip.Tip="Alt+Up">
<Path Width="14" Height="14" Margin="0,4,0,0" Data="{StaticResource Icons.Up}"/>
</Button>
<!-- MoveDown Button -->
<Button Grid.Column="5" Classes="icon_button" Click="OnMoveItemDown" ToolTip.Tip="Alt+Down">
<Path Width="14" Height="14" Margin="0,4,0,0" Data="{StaticResource Icons.Down}"/>
</Button>
</Grid> </Grid>
<!-- Commit SHA -->
<Border Grid.Column="4" IsHitTestVisible="False" ClipToBounds="True">
<TextBlock Classes="primary"
Text="{Binding Commit.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}"
HorizontalAlignment="Center"/>
</Border>
<!-- Commit Time -->
<TextBlock Grid.Column="5" Classes="primary" Text="{Binding Commit.CommitterTimeStr}" Margin="8,0"/>
<!-- MoveUp Button -->
<Button Grid.Column="6" Classes="icon_button" Click="OnMoveItemUp" ToolTip.Tip="Alt+Up">
<Path Width="14" Height="14" Margin="0,4,0,0" Data="{StaticResource Icons.Up}"/>
</Button>
<!-- MoveDown Button -->
<Button Grid.Column="7" Classes="icon_button" Click="OnMoveItemDown" ToolTip.Tip="Alt+Down">
<Path Width="14" Height="14" Margin="0,4,0,0" Data="{StaticResource Icons.Down}"/>
</Button>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>