Skip to content

Commit b084ee5

Browse files
committed
fix: left side by layout did not update after size changed
1 parent c83b1fb commit b084ee5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Views/Repository.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
</TextBox.InnerRightContent>
155155
</TextBox>
156156

157-
<Grid Grid.Row="2" x:Name="LeftSidebarGroups" Margin="0,4,0,0" RowDefinitions="28,Auto,28,Auto,28,Auto,28,Auto,28,Auto">
157+
<Grid Grid.Row="2" x:Name="LeftSidebarGroups" Margin="0,4,0,0" RowDefinitions="28,Auto,28,Auto,28,Auto,28,Auto,28,Auto" SizeChanged="OnLeftSidebarSizeChanged">
158158
<!-- Local Branches -->
159159
<ToggleButton Grid.Row="0" Classes="group_expander" IsChecked="{Binding IsLocalBranchGroupExpanded, Mode=TwoWay}">
160160
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.Repository.LocalBranches}"/>

src/Views/Repository.axaml.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,13 @@ private void OnDoubleTappedWorktree(object sender, TappedEventArgs e)
144144
private void OnLeftSidebarDataGridPropertyChanged(object _, AvaloniaPropertyChangedEventArgs e)
145145
{
146146
if (e.Property == DataGrid.ItemsSourceProperty || e.Property == DataGrid.IsVisibleProperty)
147-
{
148147
UpdateLeftSidebarLayout();
149-
}
148+
}
149+
150+
private void OnLeftSidebarSizeChanged(object _, SizeChangedEventArgs e)
151+
{
152+
if (e.HeightChanged)
153+
UpdateLeftSidebarLayout();
150154
}
151155

152156
private void UpdateLeftSidebarLayout()

0 commit comments

Comments
 (0)