Skip to content

Commit 9befd93

Browse files
committed
Fix: Disable open with icon as workaround for WinUI bug
1 parent 27ef249 commit 9befd93

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

src/Files.App/Actions/FileSystem/OpenItemAction.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ public string Label
6262
public string Description
6363
=> "OpenItemWithApplicationPickerDescription".GetLocalizedResource();
6464

65-
public RichGlyph Glyph
66-
=> new(opacityStyle: "ColorIconOpenWith");
65+
// TODO add back icon when https://github.com/microsoft/microsoft-ui-xaml/issues/9409 is resolved
66+
//public RichGlyph Glyph
67+
// => new(opacityStyle: "ColorIconOpenWith");
6768

6869
public bool IsExecutable =>
6970
context.HasSelection &&

src/Files.App/Data/Factories/ContentPageContextFlyoutFactory.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,11 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
379379
new ContextMenuFlyoutItemViewModel()
380380
{
381381
Text = "OpenWith".GetLocalizedResource(),
382-
OpacityIcon = new OpacityIconModel()
383-
{
384-
OpacityIconStyle = "ColorIconOpenWith"
385-
},
382+
// TODO add back icon when https://github.com/microsoft/microsoft-ui-xaml/issues/9409 is resolved
383+
//OpacityIcon = new OpacityIconModel()
384+
//{
385+
// OpacityIconStyle = "ColorIconOpenWith"
386+
//},
386387
Tag = "OpenWithOverflow",
387388
IsHidden = true,
388389
CollapseLabel = true,

src/Files.App/Data/Factories/ShellContextFlyoutHelper.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,11 @@ x.Tag is Win32ContextMenuItem menuItem &&
336336
{
337337
await openWithItem.LoadSubMenuAction();
338338

339-
openWithItem.OpacityIcon = new OpacityIconModel()
340-
{
341-
OpacityIconStyle = "ColorIconOpenWith",
342-
};
339+
// TODO add back icon when https://github.com/microsoft/microsoft-ui-xaml/issues/9409 is resolved
340+
//openWithItem.OpacityIcon = new OpacityIconModel()
341+
//{
342+
// OpacityIconStyle = "ColorIconOpenWith",
343+
//};
343344
var (_, openWithItems) = ContextFlyoutModelToElementHelper.GetAppBarItemsFromModel(new List<ContextMenuFlyoutItemViewModel>() { openWithItem });
344345
var placeholder = itemContextMenuFlyout.SecondaryCommands.Where(x => Equals((x as AppBarButton)?.Tag, "OpenWithPlaceholder")).FirstOrDefault() as AppBarButton;
345346
if (placeholder is not null)

0 commit comments

Comments
 (0)