Skip to content

Commit 91d73e2

Browse files
committed
fix: layout do not updated after group was collapsed
1 parent f904b3b commit 91d73e2

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Views/Repository.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
</TextBox.InnerRightContent>
232232
</TextBox>
233233

234-
<Grid Grid.Row="2" x:Name="leftSidebarGroups" RowDefinitions="28,Auto,28,Auto,28,Auto,28,Auto,28,Auto">
234+
<Grid Grid.Row="2" x:Name="leftSidebarGroups" Margin="0,4,0,0" RowDefinitions="28,Auto,28,Auto,28,Auto,28,Auto,28,Auto">
235235
<!-- Local Branches -->
236236
<ToggleButton Grid.Row="0" Classes="group_expander" IsChecked="{Binding IsLocalBranchGroupExpanded, Mode=TwoWay}">
237237
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.Repository.LocalBranches}"/>

src/Views/Repository.axaml.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,17 +392,15 @@ private void OnLeftSidebarTreeViewPropertyChanged(object sender, AvaloniaPropert
392392
{
393393
if (e.Property == TreeView.ItemsSourceProperty || e.Property == TreeView.IsVisibleProperty)
394394
{
395-
if (sender is TreeView tree && tree.IsVisible)
396-
UpdateLeftSidebarLayout();
395+
UpdateLeftSidebarLayout();
397396
}
398397
}
399398

400399
private void OnLeftSidebarDataGridPropertyChanged(object sender, AvaloniaPropertyChangedEventArgs e)
401400
{
402401
if (e.Property == DataGrid.ItemsSourceProperty || e.Property == DataGrid.IsVisibleProperty)
403402
{
404-
if (sender is DataGrid datagrid && datagrid.IsVisible)
405-
UpdateLeftSidebarLayout();
403+
UpdateLeftSidebarLayout();
406404
}
407405
}
408406

0 commit comments

Comments
 (0)