Skip to content

Commit a21d6c7

Browse files
committed
Update
1 parent 9f521ff commit a21d6c7

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/Files.App.Controls/Omnibar/Omnibar.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Copyright (c) Files Community
22
// Licensed under the MIT License.
33

4+
using CommunityToolkit.WinUI;
45
using Microsoft.UI.Xaml;
56
using Microsoft.UI.Xaml.Controls;
67
using Microsoft.UI.Xaml.Media;
78
using Microsoft.UI.Xaml.Markup;
89
using Microsoft.UI.Xaml.Shapes;
910
using Microsoft.UI.Xaml.Input;
1011
using Microsoft.UI;
11-
using CommunityToolkit.WinUI;
1212

1313
namespace Files.App.Controls
1414
{
@@ -50,6 +50,10 @@ protected override void OnApplyTemplate()
5050
if (Modes is null)
5151
return;
5252

53+
// Add shadow to the popup and set the proper width
54+
_autoSuggestBoxBorder!.Translation = new(0, 0, 32);
55+
_autoSuggestBoxBorder!.Width = _modesHostGrid!.ActualWidth;
56+
5357
// Populate the modes
5458
foreach (var mode in Modes)
5559
{

src/Files.App.Controls/Omnibar/Omnibar.xaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@
6464

6565
<Border
6666
x:Name="PART_AutoSuggestBoxBorder"
67-
Width="460"
6867
Padding="8"
69-
HorizontalAlignment="Stretch"
7068
Background="{ThemeResource AcrylicBackgroundFillColorDefaultBrush}"
7169
BorderBrush="{ThemeResource SurfaceStrokeColorFlyoutBrush}"
7270
BorderThickness="1"
@@ -75,10 +73,11 @@
7573
<ThemeShadow />
7674
</Border.Shadow>
7775

78-
<ListView HorizontalAlignment="Stretch">
79-
<ListViewItem />
80-
<ListViewItem />
76+
<ListView HorizontalAlignment="Stretch" IsItemClickEnabled="True">
77+
<ListViewItem Content="1" />
78+
<ListViewItem Content="1" />
8179
</ListView>
80+
8281
</Border>
8382
</Popup>
8483

src/Files.App.Controls/Omnibar/OmnibarMode.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ private void OmnibarMode_PointerReleased(object sender, PointerRoutedEventArgs e
8989
_isPressed = false;
9090
UpdateVisualStates();
9191

92-
Host!.ChangeExpandedMode(this);
92+
if (Host!.CurrentActiveMode == this)
93+
Host.ChangeExpandedMode(this);
9394
}
9495

9596
private void OmnibarMode_PointerExited(object sender, PointerRoutedEventArgs e)

0 commit comments

Comments
 (0)