Skip to content

Commit 3e35b22

Browse files
committed
Again
1 parent 35d7202 commit 3e35b22

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Files.App/UserControls/StatusBarControl.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@
6161
BorderThickness="0"
6262
Content="{x:Bind DirectoryPropertiesViewModel.GitBranchDisplayName, Mode=OneWay}">
6363
<Button.Flyout>
64-
<Flyout x:Name="GitBranchesFlyout" Opening="Flyout_Opening">
64+
<Flyout Opening="Flyout_Opening">
6565
<Grid
66+
x:Name="BranchesGrid"
6667
Width="300"
6768
Height="340"
68-
Margin="-16">
69+
Margin="-16"
70+
LostFocus="BranchesGrid_LostFocus">
6971
<Grid.RowDefinitions>
7072
<RowDefinition Height="Auto" />
7173
<RowDefinition Height="*" />
@@ -98,11 +100,9 @@
98100

99101
<!-- Branches List -->
100102
<ListView
101-
x:Name="BranchesListView"
102103
Grid.Row="1"
103104
Padding="4"
104105
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
105-
ItemClick="BranchesListView_ItemClick"
106106
ItemsSource="{x:Bind DirectoryPropertiesViewModel.BranchesNames, Mode=OneWay}"
107107
SelectedIndex="{x:Bind DirectoryPropertiesViewModel.SelectedBranchIndex, Mode=TwoWay}"
108108
SelectionMode="Single" />

src/Files.App/UserControls/StatusBarControl.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ private void Flyout_Opening(object sender, object e)
4949
DirectoryPropertiesViewModel.SelectedBranchIndex = DirectoryPropertiesViewModel.ActiveBranchIndex;
5050
}
5151

52-
private void BranchesListView_ItemClick(object sender, ItemClickEventArgs e)
52+
private void BranchesGrid_LostFocus(object sender, RoutedEventArgs e)
5353
{
54-
GitBranchesFlyout.Hide();
54+
((Popup)((FlyoutPresenter)((Grid)sender).Parent).Parent).IsOpen = false;
5555
}
5656
}
5757
}

0 commit comments

Comments
 (0)