Skip to content

Commit db9b13c

Browse files
committed
fix: sometimes group header disappeared
Signed-off-by: leo <[email protected]>
1 parent d3b4541 commit db9b13c

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

src/Resources/Styles.axaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@
306306
<Style Selector="TextBlock.group_header_label">
307307
<Setter Property="Foreground" Value="{DynamicResource Brush.FG2}"/>
308308
<Setter Property="FontWeight" Value="Bold"/>
309-
<Setter Property="Margin" Value="10,0,0,0"/>
310309
</Style>
311310
<Style Selector="TextBlock.table_header">
312311
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>

src/Views/CommitBaseInfo.axaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<Grid ColumnDefinitions="96,*">
1919
<v:Avatar Grid.Column="0" Width="64" Height="64" HorizontalAlignment="Right" User="{Binding Author}"/>
2020
<StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical">
21-
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.CommitDetail.Info.Author}"/>
21+
<TextBlock Classes="group_header_label" Text="{DynamicResource Text.CommitDetail.Info.Author}"/>
2222
<Grid Margin="0,10,0,8" ColumnDefinitions="Auto,*" ClipToBounds="True">
2323
<v:EnhancedSelectableTextBlock Grid.Column="0" Text="{Binding Author.Name}" Margin="2,0,8,0"/>
2424
<v:EnhancedSelectableTextBlock Grid.Column="1" Text="{Binding Author.Email}" ToolTip.Tip="{Binding Author.Email}" Foreground="{DynamicResource Brush.FG2}" TextTrimming="CharacterEllipsis"/>
@@ -34,7 +34,7 @@
3434
<Grid ColumnDefinitions="96,*" IsVisible="{Binding IsCommitterVisible}">
3535
<v:Avatar Grid.Column="0" Width="64" Height="64" HorizontalAlignment="Right" User="{Binding Committer}"/>
3636
<StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical">
37-
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.CommitDetail.Info.Committer}"/>
37+
<TextBlock Classes="group_header_label" Text="{DynamicResource Text.CommitDetail.Info.Committer}"/>
3838
<Grid Margin="0,10,0,8" ColumnDefinitions="Auto,*" ClipToBounds="True">
3939
<v:EnhancedSelectableTextBlock Grid.Column="0" Text="{Binding Committer.Name}" Margin="2,0,8,0"/>
4040
<v:EnhancedSelectableTextBlock Grid.Column="1" Text="{Binding Committer.Email}" ToolTip.Tip="{Binding Committer.Email}" Foreground="{DynamicResource Brush.FG2}" TextTrimming="CharacterEllipsis"/>

src/Views/Repository.axaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@
218218
<ToggleButton Grid.Row="0" Classes="group_expander" IsChecked="{Binding IsLocalBranchGroupExpanded, Mode=TwoWay}">
219219
<Grid ColumnDefinitions="16,*,Auto,Auto">
220220
<Path Grid.Column="0" Width="11" Height="11" HorizontalAlignment="Left" Data="{StaticResource Icons.Local}" Fill="{DynamicResource Brush.FG2}"/>
221-
<TextBlock Grid.Column="1" Classes="group_header_label" Margin="0">
222-
<Run Text="{DynamicResource Text.Repository.LocalBranches}"/>
223-
<Run Text="{Binding LocalBranchesCount, StringFormat='({0})', Mode=OneWay}"/>
224-
</TextBlock>
221+
<StackPanel Grid.Column="1" Orientation="Horizontal">
222+
<TextBlock Classes="group_header_label" Text="{DynamicResource Text.Repository.LocalBranches}"/>
223+
<TextBlock Classes="group_header_label" Text="{Binding LocalBranchesCount, StringFormat='({0})'}" Margin="4,0,0,0"/>
224+
</StackPanel>
225225
<Button Grid.Column="2"
226226
Classes="icon_button"
227227
Width="14"
@@ -251,10 +251,10 @@
251251
<ToggleButton Grid.Row="2" Classes="group_expander" IsChecked="{Binding IsRemoteGroupExpanded, Mode=TwoWay}">
252252
<Grid ColumnDefinitions="16,*,Auto,Auto">
253253
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Data="{StaticResource Icons.Remotes}" Fill="{DynamicResource Brush.FG2}"/>
254-
<TextBlock Grid.Column="1" Classes="group_header_label" Margin="0">
255-
<Run Text="{DynamicResource Text.Repository.Remotes}"/>
256-
<Run Text="{Binding Remotes, Converter={x:Static c:ListConverters.ToCount}, Mode=OneWay}"/>
257-
</TextBlock>
254+
<StackPanel Grid.Column="1" Orientation="Horizontal">
255+
<TextBlock Classes="group_header_label" Text="{DynamicResource Text.Repository.Remotes}"/>
256+
<TextBlock Classes="group_header_label" Text="{Binding Remotes, Converter={x:Static c:ListConverters.ToCount}}" Margin="4,0,0,0"/>
257+
</StackPanel>
258258
<Button Grid.Column="2"
259259
Classes="icon_button"
260260
Width="14"
@@ -284,10 +284,10 @@
284284
<ToggleButton Grid.Row="4" Classes="group_expander" IsChecked="{Binding IsTagGroupExpanded, Mode=TwoWay}">
285285
<Grid ColumnDefinitions="16,*,Auto,Auto,Auto">
286286
<Path Grid.Column="0" Width="11" Height="11" Margin="2,1,0,0" HorizontalAlignment="Left" Data="{StaticResource Icons.Tags}" Fill="{DynamicResource Brush.FG2}"/>
287-
<TextBlock Grid.Column="1" Classes="group_header_label" Margin="0">
288-
<Run Text="{DynamicResource Text.Repository.Tags}"/>
289-
<Run Text="{Binding Tags, Converter={x:Static c:ListConverters.ToCount}, Mode=OneWay}"/>
290-
</TextBlock>
287+
<StackPanel Grid.Column="1" Orientation="Horizontal">
288+
<TextBlock Classes="group_header_label" Text="{DynamicResource Text.Repository.Tags}"/>
289+
<TextBlock Classes="group_header_label" Text="{Binding Tags, Converter={x:Static c:ListConverters.ToCount}}" Margin="4,0,0,0"/>
290+
</StackPanel>
291291
<ToggleButton Grid.Column="2"
292292
Classes="show_as_tree"
293293
Width="14"
@@ -329,10 +329,10 @@
329329
<ToggleButton Grid.Row="6" Classes="group_expander" IsChecked="{Binding IsSubmoduleGroupExpanded, Mode=TwoWay}">
330330
<Grid ColumnDefinitions="16,*,Auto,Auto,Auto">
331331
<Path Grid.Column="0" Width="10" Height="10" Margin="2,0,0,0" HorizontalAlignment="Left" Data="{StaticResource Icons.Submodules}" Fill="{DynamicResource Brush.FG2}"/>
332-
<TextBlock Grid.Column="1" Classes="group_header_label" Margin="0">
333-
<Run Text="{DynamicResource Text.Repository.Submodules}"/>
334-
<Run Text="{Binding Submodules, Converter={x:Static c:ListConverters.ToCount}, Mode=OneWay}"/>
335-
</TextBlock>
332+
<StackPanel Grid.Column="1" Orientation="Horizontal">
333+
<TextBlock Classes="group_header_label" Text="{DynamicResource Text.Repository.Submodules}"/>
334+
<TextBlock Classes="group_header_label" Text="{Binding Submodules, Converter={x:Static c:ListConverters.ToCount}}" Margin="4,0,0,0"/>
335+
</StackPanel>
336336
<ToggleButton Grid.Column="2"
337337
Classes="show_as_tree"
338338
Width="14"
@@ -371,10 +371,10 @@
371371
<ToggleButton Grid.Row="8" Classes="group_expander" IsChecked="{Binding IsWorktreeGroupExpanded, Mode=TwoWay}">
372372
<Grid ColumnDefinitions="16,*,Auto,Auto">
373373
<Path Grid.Column="0" Width="11" Height="11" Margin="1,0,0,0" HorizontalAlignment="Left" Data="{StaticResource Icons.Worktrees}" Fill="{DynamicResource Brush.FG2}"/>
374-
<TextBlock Grid.Column="1" Classes="group_header_label" Margin="0">
375-
<Run Text="{DynamicResource Text.Repository.Worktrees}"/>
376-
<Run Text="{Binding Worktrees, Converter={x:Static c:ListConverters.ToCount}, Mode=OneWay}"/>
377-
</TextBlock>
374+
<StackPanel Grid.Column="1" Orientation="Horizontal">
375+
<TextBlock Classes="group_header_label" Text="{DynamicResource Text.Repository.Worktrees}"/>
376+
<TextBlock Classes="group_header_label" Text="{Binding Worktrees, Converter={x:Static c:ListConverters.ToCount}}" Margin="4,0,0,0"/>
377+
</StackPanel>
378378
<Button Grid.Column="2"
379379
Classes="icon_button"
380380
Width="14"

0 commit comments

Comments
 (0)