Skip to content

Commit

Permalink
Again
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 committed May 11, 2023
1 parent 35d7202 commit 3e35b22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Files.App/UserControls/StatusBarControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@
BorderThickness="0"
Content="{x:Bind DirectoryPropertiesViewModel.GitBranchDisplayName, Mode=OneWay}">
<Button.Flyout>
<Flyout x:Name="GitBranchesFlyout" Opening="Flyout_Opening">
<Flyout Opening="Flyout_Opening">
<Grid
x:Name="BranchesGrid"
Width="300"
Height="340"
Margin="-16">
Margin="-16"
LostFocus="BranchesGrid_LostFocus">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
Expand Down Expand Up @@ -98,11 +100,9 @@

<!-- Branches List -->
<ListView
x:Name="BranchesListView"
Grid.Row="1"
Padding="4"
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
ItemClick="BranchesListView_ItemClick"
ItemsSource="{x:Bind DirectoryPropertiesViewModel.BranchesNames, Mode=OneWay}"
SelectedIndex="{x:Bind DirectoryPropertiesViewModel.SelectedBranchIndex, Mode=TwoWay}"
SelectionMode="Single" />
Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/UserControls/StatusBarControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ private void Flyout_Opening(object sender, object e)
DirectoryPropertiesViewModel.SelectedBranchIndex = DirectoryPropertiesViewModel.ActiveBranchIndex;
}

private void BranchesListView_ItemClick(object sender, ItemClickEventArgs e)
private void BranchesGrid_LostFocus(object sender, RoutedEventArgs e)
{
GitBranchesFlyout.Hide();
((Popup)((FlyoutPresenter)((Grid)sender).Parent).Parent).IsOpen = false;
}
}
}

0 comments on commit 3e35b22

Please sign in to comment.