Skip to content

Commit 82ee74d

Browse files
committed
Simplify
1 parent 5a138c3 commit 82ee74d

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

src/Files.App/Helpers/ContextFlyoutItemHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,9 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
540540
new ContextMenuFlyoutItemViewModel()
541541
{
542542
Text = "BaseLayoutContextFlyoutNew/Label".GetLocalizedResource(),
543-
OpacityIcon = new OpacityIconModel()
543+
OpacityIcon = new UserControls.OpacityIcon()
544544
{
545-
OpacityIconStyle = (Style)Application.Current.Resources["ColorIconNew"],
545+
Style = (Style)Application.Current.Resources["ColorIconNew"],
546546
},
547547
KeyboardAccelerator = new KeyboardAccelerator
548548
{

src/Files.App/ViewModels/ContextMenuFlyoutItemViewModel.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public class ContextMenuFlyoutItemViewModel
3434

3535
public BitmapImage BitmapIcon { get; set; }
3636

37+
public OpacityIcon OpacityIcon { get; set; }
38+
3739
/// <summary>
3840
/// Only show the item when the shift key is held
3941
/// </summary>
@@ -80,7 +82,6 @@ public class ContextMenuFlyoutItemViewModel
8082
public bool CollapseLabel { get; set; }
8183

8284
public ColoredIconModel ColoredIcon { get; set; }
83-
public OpacityIconModel OpacityIcon { get; set; }
8485

8586
public bool ShowLoadingIndicator { get; set; }
8687

@@ -143,14 +144,4 @@ public struct ColoredIconModel
143144

144145
public bool IsValid => !string.IsNullOrEmpty(BaseLayerGlyph);
145146
}
146-
147-
public struct OpacityIconModel
148-
{
149-
public Style OpacityIconStyle { get; set; }
150-
151-
public OpacityIcon ToOpacityIconIcon() => new()
152-
{
153-
Style = OpacityIconStyle,
154-
};
155-
}
156147
}

0 commit comments

Comments
 (0)