code_review: PR #627

* add minimal height for both unstaged and staged changes view

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-10-30 18:10:53 +08:00
parent 2d7ea561e2
commit a4befd010a
No known key found for this signature in database

View file

@ -16,7 +16,15 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- Left --> <!-- Left -->
<Grid Grid.Column="0" RowDefinitions="28,*,28,*"> <Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="*" MinHeight="100"/>
<RowDefinition Height="1"/>
<RowDefinition Height="*" MinHeight="100"/>
</Grid.RowDefinitions>
<!-- Unstaged -->
<Grid Grid.Row="0" RowDefinitions="28,*">
<!-- Unstaged Toolbar --> <!-- Unstaged Toolbar -->
<Border Grid.Row="0" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"> <Border Grid.Row="0" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}">
<Grid ColumnDefinitions="Auto,Auto,Auto,Auto,*,Auto,Auto,Auto,Auto,Auto"> <Grid ColumnDefinitions="Auto,Auto,Auto,Auto,*,Auto,Auto,Auto,Auto,Auto">
@ -79,18 +87,18 @@
ContextRequested="OnUnstagedContextRequested" ContextRequested="OnUnstagedContextRequested"
ChangeDoubleTapped="OnUnstagedChangeDoubleTapped" ChangeDoubleTapped="OnUnstagedChangeDoubleTapped"
KeyDown="OnUnstagedKeyDown"/> KeyDown="OnUnstagedKeyDown"/>
</Grid>
<!-- Splitter --> <!-- Splitter -->
<GridSplitter Grid.Row="2" <GridSplitter Grid.Row="1"
MinWidth="1" MinHeight="1"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Background="Transparent" Background="{DynamicResource Brush.Border0}"/>
BorderThickness="0,0,1,0"
BorderBrush="{DynamicResource Brush.Border0}"/>
<!-- Staged -->
<Grid Grid.Row="2" RowDefinitions="28,*">
<!-- Staged Toolbar --> <!-- Staged Toolbar -->
<Border Grid.Row="2" BorderThickness="0,1" BorderBrush="{DynamicResource Brush.Border0}"> <Border Grid.Row="0" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}">
<Grid ColumnDefinitions="Auto,Auto,Auto,Auto,*,Auto,Auto,Auto"> <Grid ColumnDefinitions="Auto,Auto,Auto,Auto,*,Auto,Auto,Auto">
<Path Grid.Column="0" Margin="8,0,0,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Changes}"/> <Path Grid.Column="0" Margin="8,0,0,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Changes}"/>
<TextBlock Grid.Column="1" Text="{DynamicResource Text.WorkingCopy.Staged}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold" Margin="4,0,0,0"/> <TextBlock Grid.Column="1" Text="{DynamicResource Text.WorkingCopy.Staged}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold" Margin="4,0,0,0"/>
@ -116,7 +124,7 @@
</Border> </Border>
<!-- Staged Changes --> <!-- Staged Changes -->
<v:ChangeCollectionView Grid.Row="3" <v:ChangeCollectionView Grid.Row="1"
x:Name="StagedChangesView" x:Name="StagedChangesView"
Focusable="True" Focusable="True"
SelectionMode="Multiple" SelectionMode="Multiple"
@ -128,6 +136,7 @@
ChangeDoubleTapped="OnStagedChangeDoubleTapped" ChangeDoubleTapped="OnStagedChangeDoubleTapped"
KeyDown="OnStagedKeyDown"/> KeyDown="OnStagedKeyDown"/>
</Grid> </Grid>
</Grid>
<GridSplitter Grid.Column="1" <GridSplitter Grid.Column="1"
MinWidth="1" MinWidth="1"