Skip to content

Commit 5de7ab9

Browse files
authored
Feature: Show rotate options in main context menu (#11374)
1 parent 6b411c8 commit 5de7ab9

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

src/Files.App/Helpers/ContextFlyoutItemHelper.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,30 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(BaseLayo
805805
},
806806
}
807807
},
808+
new ContextMenuFlyoutItemViewModel
809+
{
810+
Text = "RotateRight".GetLocalizedResource(),
811+
ColoredIcon = new ColoredIconModel
812+
{
813+
BaseLayerGlyph = "\uF045",
814+
OverlayLayerGlyph = "\uF046",
815+
},
816+
Command = commandsViewModel.RotateImageRightCommand,
817+
ShowInSearchPage = true,
818+
ShowItem = selectedItemsPropertiesViewModel.IsSelectedItemImage
819+
},
820+
new ContextMenuFlyoutItemViewModel
821+
{
822+
Text = "RotateLeft".GetLocalizedResource(),
823+
ColoredIcon = new ColoredIconModel
824+
{
825+
BaseLayerGlyph = "\uF043",
826+
OverlayLayerGlyph = "\uF044",
827+
},
828+
Command = commandsViewModel.RotateImageLeftCommand,
829+
ShowInSearchPage = true,
830+
ShowItem = selectedItemsPropertiesViewModel.IsSelectedItemImage
831+
},
808832
new ContextMenuFlyoutItemViewModel()
809833
{
810834
Text = "BaseLayoutContextFlyoutRunAsAdmin/Text".GetLocalizedResource(),

src/Files.App/Helpers/ShellContextMenuHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Func<string, bool> FilterMenuItems(bool showOpenMenu)
4949
"cut", "copy", "paste", "delete", "properties", "link",
5050
"Windows.ModernShare", "Windows.Share", "setdesktopwallpaper",
5151
"eject", "rename", "explore", "openinfiles", "extract",
52-
"copyaspath", "undelete", "empty",
52+
"copyaspath", "undelete", "empty", "rotate90", "rotate270",
5353
Win32API.ExtractStringFromDLL("shell32.dll", 34593), // Add to collection
5454
Win32API.ExtractStringFromDLL("shell32.dll", 5384), // Pin to Start
5555
Win32API.ExtractStringFromDLL("shell32.dll", 5385), // Unpin from Start

0 commit comments

Comments
 (0)