Skip to content

Commit 1c46b2b

Browse files
committed
Update
1 parent 73b9c23 commit 1c46b2b

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright (c) Files Community
2+
// Licensed under the MIT License.
3+
4+
using CommunityToolkit.WinUI;
5+
6+
namespace Files.App.Controls
7+
{
8+
public partial class MenuFlyoutItemHeader : MenuFlyoutItem
9+
{
10+
[GeneratedDependencyProperty]
11+
public partial bool Header { get; set; }
12+
13+
public MenuFlyoutItemHeader()
14+
{
15+
//this.InitializeComponent();
16+
}
17+
}
18+
}

src/Files.App/UserControls/NavigationToolbar.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,11 @@
341341
Grid.Column="1"
342342
x:Load="{x:Bind ViewModel.EnableOmnibar, Mode=OneWay}"
343343
CurrentSelectedModeName="{x:Bind ViewModel.OmnibarCurrentSelectedModeName, Mode=TwoWay}"
344-
IsFocused="{x:Bind ViewModel.IsOmnibarFocused, Mode=TwoWay}">
344+
IsFocused="{x:Bind ViewModel.IsOmnibarFocused, Mode=TwoWay}"
345+
SuggestionChosen="Omnibar_SuggestionChosen">
345346

346347
<controls:OmnibarMode
348+
DisplayMemberPath="Path"
347349
IconOnActive="{controls:ThemedIconMarkup Style={StaticResource App.ThemedIcons.Omnibar.Path}, IsFilled=True}"
348350
IconOnInactive="{controls:ThemedIconMarkup Style={StaticResource App.ThemedIcons.Omnibar.Path}, IconType=Outline}"
349351
IsDefault="True"

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ private void ClickablePath_GettingFocus(UIElement sender, GettingFocusEventArgs
254254
ViewModel.IsEditModeEnabled = true;
255255
}
256256

257+
private void Omnibar_SuggestionChosen(Controls.Omnibar sender, Controls.OmnibarSuggestionChosenEventArgs args)
258+
{
259+
260+
}
261+
257262
private async void BreadcrumbBar_ItemClicked(Controls.BreadcrumbBar sender, Controls.BreadcrumbBarItemClickedEventArgs args)
258263
{
259264
if (args.IsRootItem)

src/Files.App/ViewModels/UserControls/NavigationToolbarViewModel.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,13 @@ public bool IsOmnibarFocused
212212
{
213213
if (value)
214214
{
215-
EditModeEnabled?.Invoke(this, EventArgs.Empty);
216-
217215
switch(OmnibarCurrentSelectedModeName)
218216
{
219217
case OmnibarPathModeName:
218+
OmnibarPathModeText =
219+
string.IsNullOrEmpty(ContentPageContext.ShellPage?.ShellViewModel?.WorkingDirectory)
220+
? Constants.UserEnvironmentPaths.HomePath
221+
: ContentPageContext.ShellPage.ShellViewModel.WorkingDirectory;
220222
_ = PopulateOmnibarSuggestionsForPathMode();
221223
break;
222224
case OmnibarPaletteModeName:

0 commit comments

Comments
 (0)