Skip to content

Commit 6090141

Browse files
committed
Fix: Fixed LabelPosition for context menu
1 parent 142d504 commit 6090141

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Files.App/Helpers/MenuFlyout/ContextFlyoutModelToElementHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private static MenuFlyoutItemBase GetItem(ContextMenuFlyoutItemViewModel i)
147147
};
148148
if (!string.IsNullOrEmpty(i.Glyph))
149149
{
150-
flyoutItem.Icon = new FontIcon{ Glyph = i.Glyph };
150+
flyoutItem.Icon = new FontIcon { Glyph = i.Glyph };
151151
}
152152
}
153153
else
@@ -248,7 +248,7 @@ private static ICommandBarElement GetCommandBarButton(ContextMenuFlyoutItemViewM
248248
CommandParameter = item.CommandParameter,
249249
IsChecked = item.IsChecked,
250250
Content = content,
251-
LabelPosition = item.CollapseLabel ? CommandBarLabelPosition.Collapsed : CommandBarLabelPosition.Default,
251+
LabelPosition = item.IsPrimary || item.CollapseLabel ? CommandBarLabelPosition.Collapsed : CommandBarLabelPosition.Default,
252252
IsEnabled = item.IsEnabled,
253253
Visibility = item.IsHidden ? Visibility.Collapsed : Visibility.Visible,
254254
};
@@ -277,7 +277,7 @@ private static ICommandBarElement GetCommandBarButton(ContextMenuFlyoutItemViewM
277277
Command = item.Command,
278278
CommandParameter = item.CommandParameter,
279279
Flyout = ctxFlyout,
280-
LabelPosition = item.CollapseLabel ? CommandBarLabelPosition.Collapsed : CommandBarLabelPosition.Default,
280+
LabelPosition = item.IsPrimary || item.CollapseLabel ? CommandBarLabelPosition.Collapsed : CommandBarLabelPosition.Default,
281281
Content = content,
282282
IsEnabled = item.IsEnabled,
283283
Visibility = item.IsHidden ? Visibility.Collapsed : Visibility.Visible,

0 commit comments

Comments
 (0)