Skip to content

Commit f1b4378

Browse files
committed
ux: use BranchSelector instead of ComboBox to select local branch in Push pop
Signed-off-by: leo <longshuang@msn.cn>
1 parent 908faf3 commit f1b4378

3 files changed

Lines changed: 9 additions & 20 deletions

File tree

‎src/Views/ExecuteCustomAction.axaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
HorizontalAlignment="Right" VerticalAlignment="Center"
150150
Margin="0,0,8,0"/>
151151
<v:BranchSelector Grid.Row="0" Grid.Column="1"
152-
Height="28" Padding="8,0"
152+
Height="28"
153153
VerticalAlignment="Center" HorizontalAlignment="Stretch"
154154
Branches="{Binding Branches, Mode=OneWay}"
155155
SelectedBranch="{Binding SelectedBranch, Mode=TwoWay}"/>

‎src/Views/Pull.axaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
Margin="0,0,8,0"
4646
Text="{DynamicResource Text.Pull.Branch}"/>
4747
<v:BranchSelector Grid.Row="1" Grid.Column="1"
48-
Height="28" Padding="8,0"
48+
Height="28"
4949
VerticalAlignment="Center" HorizontalAlignment="Stretch"
5050
Branches="{Binding RemoteBranches, Mode=OneWay}"
5151
SelectedBranch="{Binding SelectedBranch, Mode=TwoWay}"

‎src/Views/Push.axaml‎

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,12 @@
2424
HorizontalAlignment="Right" VerticalAlignment="Center"
2525
Margin="0,0,8,0"
2626
Text="{DynamicResource Text.Push.Local}"/>
27-
<ComboBox Grid.Row="0" Grid.Column="1"
28-
Height="28" Padding="8,0"
29-
VerticalAlignment="Center" HorizontalAlignment="Stretch"
30-
ItemsSource="{Binding LocalBranches}"
31-
SelectedItem="{Binding SelectedLocalBranch, Mode=TwoWay}"
32-
IsTextSearchEnabled="True"
33-
TextSearch.TextBinding="{Binding Name, DataType=m:Branch}"
34-
IsEnabled="{Binding !HasSpecifiedLocalBranch}">
35-
<ComboBox.ItemTemplate>
36-
<DataTemplate x:DataType="{x:Type m:Branch}">
37-
<StackPanel Orientation="Horizontal" Height="20" VerticalAlignment="Center">
38-
<Path Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Branch}"/>
39-
<TextBlock Text="{Binding Name}"/>
40-
</StackPanel>
41-
</DataTemplate>
42-
</ComboBox.ItemTemplate>
43-
</ComboBox>
27+
<v:BranchSelector Grid.Row="0" Grid.Column="1"
28+
Height="28"
29+
VerticalAlignment="Center" HorizontalAlignment="Stretch"
30+
Branches="{Binding LocalBranches}"
31+
SelectedBranch="{Binding SelectedLocalBranch, Mode=TwoWay}"
32+
IsEnabled="{Binding !HasSpecifiedLocalBranch}"/>
4433

4534
<TextBlock Grid.Row="1" Grid.Column="0"
4635
HorizontalAlignment="Right" VerticalAlignment="Center"
@@ -67,7 +56,7 @@
6756
Text="{DynamicResource Text.Push.To}"/>
6857
<Grid Grid.Row="2" Grid.Column="1" ColumnDefinitions="*,Auto">
6958
<v:BranchSelector Grid.Column="0"
70-
Height="28" Padding="8,0"
59+
Height="28"
7160
VerticalAlignment="Center" HorizontalAlignment="Stretch"
7261
Branches="{Binding RemoteBranches, Mode=OneWay}"
7362
SelectedBranch="{Binding SelectedRemoteBranch, Mode=TwoWay}"

0 commit comments

Comments
 (0)