Skip to content

Commit

Permalink
Fix: Fixed minimum menu width for recent files widget (#11386)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 authored Feb 21, 2023
1 parent 6140089 commit df3dfcd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Files.App/UserControls/Widgets/RecentFilesWidget.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,8 @@ private void Grid_RightTapped(object sender, RightTappedRoutedEventArgs e)
var menuItems = GetItemMenuItems(item, false);
var (_, secondaryElements) = ItemModelListToContextFlyoutHelper.GetAppBarItemsFromModel(menuItems);

if (!UserSettingsService.PreferencesSettingsService.MoveShellExtensionsToSubMenu)
secondaryElements.OfType<FrameworkElement>()
.ForEach(i => i.MinWidth = Constants.UI.ContextMenuItemsMaxWidth); // Set menu min width if the overflow menu setting is disabled
secondaryElements.OfType<FrameworkElement>()
.ForEach(i => i.MinWidth = Constants.UI.ContextMenuItemsMaxWidth);

secondaryElements.ForEach(i => itemContextMenuFlyout.SecondaryCommands.Add(i));
itemContextMenuFlyout.ShowAt(recentItemsGrid, new FlyoutShowOptions { Position = e.GetPosition(recentItemsGrid) });
Expand Down Expand Up @@ -199,7 +198,7 @@ private void OpenFileLocation(RecentItem item)
ItemName = Path.GetFileName(item.RecentPath), // file name w extension
});
}

private async Task UpdateRecentsList(NotifyCollectionChangedEventArgs e)
{
try
Expand Down

0 comments on commit df3dfcd

Please sign in to comment.