diff --git a/src/Files.App/BaseLayout.cs b/src/Files.App/BaseLayout.cs index 0522e33ab1cd..9190ab99c6c3 100644 --- a/src/Files.App/BaseLayout.cs +++ b/src/Files.App/BaseLayout.cs @@ -635,7 +635,7 @@ private void AddNewFileTagsToMenu(CommandBarFlyout contextMenu) private void AddShellItemsToMenu(List shellMenuItems, CommandBarFlyout contextMenuFlyout, bool shiftPressed) { var openWithSubItems = ItemModelListToContextFlyoutHelper.GetMenuFlyoutItemsFromModel(ShellContextmenuHelper.GetOpenWithItems(shellMenuItems)); - var mainShellMenuItems = shellMenuItems.RemoveFrom(!UserSettingsService.AppearanceSettingsService.MoveOverflowMenuItemsToSubMenu ? int.MaxValue : shiftPressed ? 6 : 4); + var mainShellMenuItems = shellMenuItems.RemoveFrom(!UserSettingsService.AppearanceSettingsService.MoveShellExtensionsToSubMenu ? int.MaxValue : shiftPressed ? 6 : 0); var overflowShellMenuItems = shellMenuItems.Except(mainShellMenuItems).ToList(); var overflowItems = ItemModelListToContextFlyoutHelper.GetMenuFlyoutItemsFromModel(overflowShellMenuItems); diff --git a/src/Files.App/Helpers/ContextFlyoutItemHelper.cs b/src/Files.App/Helpers/ContextFlyoutItemHelper.cs index 634905b969b7..c474e6229756 100644 --- a/src/Files.App/Helpers/ContextFlyoutItemHelper.cs +++ b/src/Files.App/Helpers/ContextFlyoutItemHelper.cs @@ -55,7 +55,7 @@ public static List Filter(List x.ID == "ItemOverflow").FirstOrDefault(); if (overflow is not null) { - if (!shiftPressed && userSettingsService.AppearanceSettingsService.MoveOverflowMenuItemsToSubMenu) // items with ShowOnShift to overflow menu + if (!shiftPressed && userSettingsService.AppearanceSettingsService.MoveShellExtensionsToSubMenu) // items with ShowOnShift to overflow menu { var overflowItems = items.Where(x => x.ShowOnShift).ToList(); @@ -609,7 +609,7 @@ public static List GetBaseLayoutMenuItems(Curren }, new ContextMenuFlyoutItemViewModel() { - Text = "ContextMenuMoreItemsLabel".GetLocalizedResource(), + Text = "ShowMoreOptions".GetLocalizedResource(), Glyph = "\xE712", Items = new List(), ID = "ItemOverflow", @@ -1074,7 +1074,7 @@ public static List GetBaseItemMenuItems(BaseLayo }, new ContextMenuFlyoutItemViewModel() { - Text = "ContextMenuMoreItemsLabel".GetLocalizedResource(), + Text = "ShowMoreOptions".GetLocalizedResource(), Glyph = "\xE712", Items = new List(), ID = "ItemOverflow", diff --git a/src/Files.App/Helpers/ShellContextMenuHelper.cs b/src/Files.App/Helpers/ShellContextMenuHelper.cs index 33552d2672ed..469fea5e3749 100644 --- a/src/Files.App/Helpers/ShellContextMenuHelper.cs +++ b/src/Files.App/Helpers/ShellContextMenuHelper.cs @@ -88,7 +88,7 @@ public static void LoadMenuFlyoutItem(IList menu { var menuLayoutSubItem = new ContextMenuFlyoutItemViewModel() { - Text = "ContextMenuMoreItemsLabel".GetLocalizedResource(), + Text = "ShowMoreOptions".GetLocalizedResource(), Glyph = "\xE712", }; LoadMenuFlyoutItem(menuLayoutSubItem.Items, contextMenu, overflowItems, cancellationToken, showIcons); diff --git a/src/Files.App/ServicesImplementation/Settings/AppearanceSettingsService.cs b/src/Files.App/ServicesImplementation/Settings/AppearanceSettingsService.cs index 96b127492d21..2d7210498217 100644 --- a/src/Files.App/ServicesImplementation/Settings/AppearanceSettingsService.cs +++ b/src/Files.App/ServicesImplementation/Settings/AppearanceSettingsService.cs @@ -26,7 +26,7 @@ public bool IsSidebarOpen set => Set(value); } - public bool MoveOverflowMenuItemsToSubMenu + public bool MoveShellExtensionsToSubMenu { get => Get(true); set => Set(value); @@ -77,7 +77,7 @@ protected override void RaiseOnSettingChangedEvent(object sender, SettingChanged { switch (e.SettingName) { - case nameof(MoveOverflowMenuItemsToSubMenu): + case nameof(MoveShellExtensionsToSubMenu): case nameof(UseCompactStyles): case nameof(AppThemeBackgroundColor): case nameof(AppThemeAddressBarBackgroundColor): diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index 62c822a449d9..0fe90fc0e546 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -738,8 +738,8 @@ Item name was too long - - More + + Show more options The application needs to be restarted in order to apply these settings, would you like to restart the app? diff --git a/src/Files.App/UserControls/SidebarControl.xaml.cs b/src/Files.App/UserControls/SidebarControl.xaml.cs index b782a932d09c..e88297349d8c 100644 --- a/src/Files.App/UserControls/SidebarControl.xaml.cs +++ b/src/Files.App/UserControls/SidebarControl.xaml.cs @@ -316,7 +316,7 @@ private List GetLocationItemMenuItems(INavigatio }, new ContextMenuFlyoutItemViewModel() { - Text = "ContextMenuMoreItemsLabel".GetLocalizedResource(), + Text = "ShowMoreOptions".GetLocalizedResource(), Glyph = "\xE712", Items = new List(), ID = "ItemOverflow", @@ -498,7 +498,7 @@ private void NavigationViewItem_RightTapped(object sender, RightTappedRoutedEven var menuItems = GetLocationItemMenuItems(item, itemContextMenuFlyout); var (_, secondaryElements) = ItemModelListToContextFlyoutHelper.GetAppBarItemsFromModel(menuItems); - if (!UserSettingsService.AppearanceSettingsService.MoveOverflowMenuItemsToSubMenu) + if (!UserSettingsService.AppearanceSettingsService.MoveShellExtensionsToSubMenu) secondaryElements.OfType() .ForEach(i => i.MinWidth = Constants.UI.ContextMenuItemsMaxWidth); // Set menu min width if the overflow menu setting is disabled @@ -1056,7 +1056,7 @@ private async void LoadShellMenuItems(CommandBarFlyout itemContextMenuFlyout, Co var shiftPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down); var shellMenuItems = await ContextFlyoutItemHelper.GetItemContextShellCommandsAsync(currentInstanceViewModel: null, workingDir: null, new List() { new ListedItem(null) { ItemPath = rightClickedItem.Path } }, shiftPressed: shiftPressed, showOpenMenu: false, default); - if (!UserSettingsService.AppearanceSettingsService.MoveOverflowMenuItemsToSubMenu) + if (!UserSettingsService.AppearanceSettingsService.MoveShellExtensionsToSubMenu) { var (_, secondaryElements) = ItemModelListToContextFlyoutHelper.GetAppBarItemsFromModel(shellMenuItems); if (!secondaryElements.Any()) diff --git a/src/Files.App/ViewModels/SettingsViewModels/AppearanceViewModel.cs b/src/Files.App/ViewModels/SettingsViewModels/AppearanceViewModel.cs index 1ae5edbadd75..7f566bc93151 100644 --- a/src/Files.App/ViewModels/SettingsViewModels/AppearanceViewModel.cs +++ b/src/Files.App/ViewModels/SettingsViewModels/AppearanceViewModel.cs @@ -95,14 +95,14 @@ public ElementTheme SelectedElementTheme get => (ElementTheme)selectedThemeIndex; } - public bool MoveOverflowMenuItemsToSubMenu + public bool MoveShellExtensionsToSubMenu { - get => UserSettingsService.AppearanceSettingsService.MoveOverflowMenuItemsToSubMenu; + get => UserSettingsService.AppearanceSettingsService.MoveShellExtensionsToSubMenu; set { - if (value != UserSettingsService.AppearanceSettingsService.MoveOverflowMenuItemsToSubMenu) + if (value != UserSettingsService.AppearanceSettingsService.MoveShellExtensionsToSubMenu) { - UserSettingsService.AppearanceSettingsService.MoveOverflowMenuItemsToSubMenu = value; + UserSettingsService.AppearanceSettingsService.MoveShellExtensionsToSubMenu = value; OnPropertyChanged(); } } diff --git a/src/Files.App/Views/SettingsPages/Appearance.xaml b/src/Files.App/Views/SettingsPages/Appearance.xaml index 19753762a20b..36b8f0cdb045 100644 --- a/src/Files.App/Views/SettingsPages/Appearance.xaml +++ b/src/Files.App/Views/SettingsPages/Appearance.xaml @@ -182,7 +182,7 @@ diff --git a/src/Files.Backend/Services/Settings/IAppearanceSettingsService.cs b/src/Files.Backend/Services/Settings/IAppearanceSettingsService.cs index b28f9d9cd8fb..2a4d980ff0ef 100644 --- a/src/Files.Backend/Services/Settings/IAppearanceSettingsService.cs +++ b/src/Files.Backend/Services/Settings/IAppearanceSettingsService.cs @@ -6,9 +6,9 @@ namespace Files.Backend.Services.Settings public interface IAppearanceSettingsService : IBaseSettingsService, INotifyPropertyChanged { /// - /// Gets or sets a value indicating whether or not to move overflow menu items into a sub menu. + /// Gets or sets a value indicating whether or not to move shell extensions into a sub menu. /// - bool MoveOverflowMenuItemsToSubMenu { get; set; } + bool MoveShellExtensionsToSubMenu { get; set; } #region Internal Settings