From aa2a3bb0bb3af6dbd2c75620b5e47ac597ea3ced Mon Sep 17 00:00:00 2001 From: 0x5BFA <62196528+0x5bfa@users.noreply.github.com> Date: Sat, 12 Jul 2025 02:58:42 +0900 Subject: [PATCH 1/3] Fixed "Suggestions in path mode don't update when switching tabs" --- src/Files.App.Controls/Omnibar/Omnibar.cs | 6 ++++++ src/Files.App.Controls/Omnibar/OmnibarMode.cs | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Files.App.Controls/Omnibar/Omnibar.cs b/src/Files.App.Controls/Omnibar/Omnibar.cs index 80d310061eb5..131ca89f4ef5 100644 --- a/src/Files.App.Controls/Omnibar/Omnibar.cs +++ b/src/Files.App.Controls/Omnibar/Omnibar.cs @@ -219,6 +219,12 @@ internal protected bool TryToggleIsSuggestionsPopupOpen(bool wantToOpen) return false; } + if (CurrentSelectedMode is not null) + { + _textBoxSuggestionsListView.ItemTemplate = CurrentSelectedMode.ItemTemplate; + _textBoxSuggestionsListView.ItemsSource = CurrentSelectedMode.ItemsSource; + } + _textBoxSuggestionsPopup.IsOpen = wantToOpen; GlobalHelper.WriteDebugStringForOmnibar("The suggestions pop-up is open."); diff --git a/src/Files.App.Controls/Omnibar/OmnibarMode.cs b/src/Files.App.Controls/Omnibar/OmnibarMode.cs index e91e05abe24b..c81216c25a08 100644 --- a/src/Files.App.Controls/Omnibar/OmnibarMode.cs +++ b/src/Files.App.Controls/Omnibar/OmnibarMode.cs @@ -35,7 +35,13 @@ protected override void OnApplyTemplate() _modeButton = GetTemplateChild(TemplatePartName_ModeButton) as Button ?? throw new MissingFieldException($"Could not find {TemplatePartName_ModeButton} in the given {nameof(OmnibarMode)}'s style."); - + + RegisterPropertyChangedCallback(ItemsSourceProperty, (d, dp) => + { + if (_ownerRef is not null && _ownerRef.TryGetTarget(out var owner)) + owner.TryToggleIsSuggestionsPopupOpen(true); + }); + Loaded += OmnibarMode_Loaded; _modeButton.PointerEntered += ModeButton_PointerEntered; _modeButton.PointerPressed += ModeButton_PointerPressed; From df616093c3e62fedf3ebf8a58c782128d681350e Mon Sep 17 00:00:00 2001 From: 0x5BFA <62196528+0x5bfa@users.noreply.github.com> Date: Sat, 12 Jul 2025 04:27:49 +0900 Subject: [PATCH 2/3] Added OneWay to the suggestion template for Palette --- src/Files.App/UserControls/NavigationToolbar.xaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Files.App/UserControls/NavigationToolbar.xaml b/src/Files.App/UserControls/NavigationToolbar.xaml index 697ae5df3c36..a4654dd64e96 100644 --- a/src/Files.App/UserControls/NavigationToolbar.xaml +++ b/src/Files.App/UserControls/NavigationToolbar.xaml @@ -416,10 +416,10 @@ - + Visibility="{x:Bind Glyph, Converter={StaticResource NullToVisibilityCollapsedConverter}, Mode=OneWay}"> + - + @@ -439,7 +439,7 @@ x:Name="RightAlignedKeyboardShortcut" Grid.Column="2" VerticalAlignment="Center" - HotKeys="{x:Bind HotKeys}" /> + HotKeys="{x:Bind HotKeys, Mode=OneWay}" /> From 7fcb1ad638e07396db2ba0406602b8e469c3a76b Mon Sep 17 00:00:00 2001 From: 0x5BFA <62196528+0x5bfa@users.noreply.github.com> Date: Mon, 14 Jul 2025 13:12:09 +0900 Subject: [PATCH 3/3] Hide the icons in suggestions in Palette mode --- src/Files.App/UserControls/NavigationToolbar.xaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Files.App/UserControls/NavigationToolbar.xaml b/src/Files.App/UserControls/NavigationToolbar.xaml index a4654dd64e96..a9fa7e44ff6a 100644 --- a/src/Files.App/UserControls/NavigationToolbar.xaml +++ b/src/Files.App/UserControls/NavigationToolbar.xaml @@ -407,12 +407,15 @@ - + - +