Skip to content

Commit fbc99bd

Browse files
committed
Suggested changes
1 parent 4abae3b commit fbc99bd

16 files changed

+57
-56
lines changed

src/Files.App/Data/Commands/IRichCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) 2024 Files Community
22
// Licensed under the MIT License. See the LICENSE.
33

4+
using Files.App.Controls;
45
using Microsoft.UI.Xaml;
56
using Microsoft.UI.Xaml.Controls;
67
using Microsoft.UI.Xaml.Input;
@@ -39,7 +40,7 @@ public interface IRichCommand : ICommand, INotifyPropertyChanging, INotifyProper
3940
string Description { get; }
4041

4142
/// <summary>
42-
/// Gets string glyph or ThemedIcon style.
43+
/// Gets string glyph or <see cref="ThemedIcon"/> style.
4344
/// </summary>
4445
RichGlyph Glyph { get; }
4546

@@ -54,7 +55,7 @@ public interface IRichCommand : ICommand, INotifyPropertyChanging, INotifyProper
5455
FontIcon? FontIcon { get; }
5556

5657
/// <summary>
57-
/// Gets the commands ThemedIcon style.
58+
/// Gets the commands <see cref="ThemedIcon"/> style.
5859
/// </summary>
5960
Style? ThemedIconStyle { get; }
6061

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
138138
new ContextMenuFlyoutItemViewModel()
139139
{
140140
Text = "SortBy".GetLocalizedResource(),
141-
ThemedIcon = new ThemedIconModel()
141+
ThemedIconModel = new ThemedIconModel()
142142
{
143-
ThemedIconStyle= "App.ThemedIcons.Sorting",
143+
ThemedIconStyle = "App.ThemedIcons.Sorting",
144144
},
145145
ShowItem = !itemsSelected,
146146
ShowInRecycleBin = true,
@@ -350,7 +350,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
350350
},
351351
new ContextMenuFlyoutItemViewModel()
352352
{
353-
ThemedIcon = new ThemedIconModel()
353+
ThemedIconModel = new ThemedIconModel()
354354
{
355355
ThemedIconStyle = Commands.AddItem.Glyph.ThemedIconStyle
356356
},
@@ -381,9 +381,9 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
381381
{
382382
// TODO add back text and icon when https://github.com/microsoft/microsoft-ui-xaml/issues/9409 is resolved
383383
//Text = "OpenWith".GetLocalizedResource(),
384-
//ThemedIcon = new ThemedIconModel()
384+
//ThemedIconModel = new ThemedIconModel()
385385
//{
386-
// ThemedIconStyle= "ColorIconOpenWith"
386+
// ThemedIconStyle = "ColorIconOpenWith"
387387
//},
388388
Tag = "OpenWithOverflow",
389389
IsHidden = true,
@@ -509,9 +509,9 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
509509
{
510510
Text = "Compress".GetLocalizedResource(),
511511
ShowInSearchPage = true,
512-
ThemedIcon = new ThemedIconModel()
512+
ThemedIconModel = new ThemedIconModel()
513513
{
514-
ThemedIconStyle= "App.ThemedIcons.Zip",
514+
ThemedIconStyle = "App.ThemedIcons.Zip",
515515
},
516516
Items =
517517
[
@@ -525,9 +525,9 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
525525
{
526526
Text = "Extract".GetLocalizedResource(),
527527
ShowInSearchPage = true,
528-
ThemedIcon = new ThemedIconModel()
528+
ThemedIconModel = new ThemedIconModel()
529529
{
530-
ThemedIconStyle= "App.ThemedIcons.Zip",
530+
ThemedIconStyle = "App.ThemedIcons.Zip",
531531
},
532532
Items =
533533
[
@@ -580,7 +580,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
580580
},
581581
// Shell extensions are not available on the FTP server or in the archive,
582582
// but following items are intentionally added because icons in the context menu will not appear
583-
// unless there is at least one menu item with an icon that is not an ThemedIcon. (#12943)
583+
// unless there is at least one menu item with an icon that is not an ThemedIconModel. (#12943)
584584
new ContextMenuFlyoutItemViewModel()
585585
{
586586
ItemType = ContextMenuFlyoutItemType.Separator,

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

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

339-
openWithItem.ThemedIcon = new ThemedIconModel()
339+
openWithItem.ThemedIconModel = new ThemedIconModel()
340340
{
341-
ThemedIconStyle= "App.ThemedIcons.OpenWith",
341+
ThemedIconStyle = "App.ThemedIcons.OpenWith",
342342
};
343343
var (_, openWithItems) = ContextFlyoutModelToElementHelper.GetAppBarItemsFromModel([openWithItem]);
344344
var index = 0;

src/Files.App/Data/Items/NavigationViewItemButtonStyleItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public sealed class NavigationViewItemButtonStyleItem : ObservableObject
1111

1212
public PropertiesNavigationViewItemType ItemType;
1313

14-
private Style _ThemedIconStyle= (Style)Application.Current.Resources["App.ThemedIcons.Properties"];
14+
private Style _ThemedIconStyle = (Style)Application.Current.Resources["App.ThemedIcons.Properties"];
1515
public Style ThemedIconStyle
1616
{
1717
get => _ThemedIconStyle;

src/Files.App/Data/Models/ContextMenuFlyoutItemViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public sealed class ContextMenuFlyoutItemViewModel
5757

5858
public bool CollapseLabel { get; set; }
5959

60-
public ThemedIconModel ThemedIcon { get; set; }
60+
public ThemedIconModel ThemedIconModel { get; set; }
6161

6262
public bool ShowLoadingIndicator { get; set; }
6363

src/Files.App/Data/Models/ContextMenuFlyoutItemViewModelBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public ContextMenuFlyoutItemViewModel Build()
6969
var glyph = command.Glyph;
7070
if (!string.IsNullOrEmpty(glyph.ThemedIconStyle))
7171
{
72-
viewModel.ThemedIcon = new ThemedIconModel
72+
viewModel.ThemedIconModel = new ThemedIconModel
7373
{
7474
ThemedIconStyle = glyph.ThemedIconStyle,
7575
};

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ private static ICommandBarElement GetCommandBarButton(ContextMenuFlyoutItemViewM
229229
{
230230
Source = item.BitmapIcon,
231231
};
232-
else if (item.ThemedIcon.IsValid)
233-
content = item.ThemedIcon.ToThemedIcon();
232+
else if (item.ThemedIconModel.IsValid)
233+
content = item.ThemedIconModel.ToThemedIcon();
234234
else if (item.ShowLoadingIndicator)
235235
content = new ProgressRing()
236236
{

src/Files.App/UserControls/InnerNavigationToolbar.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,21 +540,21 @@
540540
Command="{x:Bind Commands.SelectAll}"
541541
KeyboardAcceleratorTextOverride="{x:Bind Commands.SelectAll.HotKeyText, Mode=OneWay}"
542542
Text="{x:Bind Commands.SelectAll.Label}"
543-
ThemedIconStyle="{x:Bind Commands.SelectAll.ThemedIconStyle}" />
543+
ThemedIconStyle ="{x:Bind Commands.SelectAll.ThemedIconStyle}" />
544544
<local:MenuFlyoutItemWithThemedIcon
545545
x:Name="InvertSelectionMFI"
546546
AccessKey="I"
547547
Command="{x:Bind Commands.InvertSelection}"
548548
KeyboardAcceleratorTextOverride="{x:Bind Commands.InvertSelection.HotKeyText, Mode=OneWay}"
549549
Text="{x:Bind Commands.InvertSelection.Label}"
550-
ThemedIconStyle="{x:Bind Commands.InvertSelection.ThemedIconStyle}" />
550+
ThemedIconStyle ="{x:Bind Commands.InvertSelection.ThemedIconStyle}" />
551551
<local:MenuFlyoutItemWithThemedIcon
552552
x:Name="ClearSelectionMFI"
553553
AccessKey="C"
554554
Command="{x:Bind Commands.ClearSelection}"
555555
KeyboardAcceleratorTextOverride="{x:Bind Commands.ClearSelection.HotKeyText, Mode=OneWay}"
556556
Text="{x:Bind Commands.ClearSelection.Label}"
557-
ThemedIconStyle="{x:Bind Commands.ClearSelection.ThemedIconStyle}" />
557+
ThemedIconStyle ="{x:Bind Commands.ClearSelection.ThemedIconStyle}" />
558558
</MenuFlyout>
559559
</AppBarButton.Flyout>
560560

src/Files.App/UserControls/StatusBar.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
Command="{x:Bind Commands.GitPull}"
229229
IsEnabled="{x:Bind Commands.GitPull.IsExecutable, Mode=OneWay}"
230230
Text="{x:Bind Commands.GitPull.Label}"
231-
ThemedIconStyle="{StaticResource App.ThemedIcons.Git.Pull}"
231+
ThemedIconStyle ="{StaticResource App.ThemedIcons.Git.Pull}"
232232
ToolTipService.ToolTip="{x:Bind Commands.GitPull.LabelWithHotKey, Mode=OneWay}" />
233233

234234
<!-- Push Button -->
@@ -237,7 +237,7 @@
237237
Command="{x:Bind Commands.GitPush}"
238238
IsEnabled="{x:Bind Commands.GitPush.IsExecutable, Mode=OneWay}"
239239
Text="{x:Bind Commands.GitPush.Label}"
240-
ThemedIconStyle="{StaticResource App.ThemedIcons.Git.Push}"
240+
ThemedIconStyle ="{StaticResource App.ThemedIcons.Git.Push}"
241241
ToolTipService.ToolTip="{x:Bind Commands.GitPush.LabelWithHotKey, Mode=OneWay}" />
242242

243243
<!-- Sync Button -->
@@ -246,7 +246,7 @@
246246
Command="{x:Bind Commands.GitSync}"
247247
IsEnabled="{x:Bind Commands.GitSync.IsExecutable, Mode=OneWay}"
248248
Text="{x:Bind Commands.GitSync.Label}"
249-
ThemedIconStyle="{StaticResource App.ThemedIcons.Git.Sync}"
249+
ThemedIconStyle ="{StaticResource App.ThemedIcons.Git.Sync}"
250250
ToolTipService.ToolTip="{x:Bind Commands.GitSync.LabelWithHotKey, Mode=OneWay}" />
251251
</MenuFlyout>
252252
</Button.Flyout>

src/Files.App/UserControls/TabBar/TabBar.xaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,23 +122,23 @@
122122
Command="{x:Bind Commands.NewWindow}"
123123
KeyboardAcceleratorTextOverride="{x:Bind Commands.NewWindow.HotKeyText, Mode=OneWay}"
124124
Text="{x:Bind Commands.NewWindow.Label}"
125-
ThemedIconStyle="{x:Bind Commands.NewWindow.ThemedIconStyle}" />
125+
ThemedIconStyle ="{x:Bind Commands.NewWindow.ThemedIconStyle}" />
126126

127127
<!-- Enter Compact Overlay -->
128128
<uc:MenuFlyoutItemWithThemedIcon
129129
x:Name="EnterCompactOverlayTabActionButton"
130130
x:Load="{x:Bind Commands.EnterCompactOverlay.IsExecutable, Mode=OneWay}"
131131
Command="{x:Bind Commands.EnterCompactOverlay}"
132132
Text="{x:Bind Commands.EnterCompactOverlay.Label}"
133-
ThemedIconStyle="{x:Bind Commands.EnterCompactOverlay.ThemedIconStyle}" />
133+
ThemedIconStyle ="{x:Bind Commands.EnterCompactOverlay.ThemedIconStyle}" />
134134

135135
<!-- Exit Compact Overlay -->
136136
<uc:MenuFlyoutItemWithThemedIcon
137137
x:Name="ExitCompactOverlayTabActionButton"
138138
x:Load="{x:Bind Commands.ExitCompactOverlay.IsExecutable, Mode=OneWay}"
139139
Command="{x:Bind Commands.ExitCompactOverlay}"
140140
Text="{x:Bind Commands.ExitCompactOverlay.Label}"
141-
ThemedIconStyle="{x:Bind Commands.ExitCompactOverlay.ThemedIconStyle}" />
141+
ThemedIconStyle ="{x:Bind Commands.ExitCompactOverlay.ThemedIconStyle}" />
142142

143143
<!-- Add Pane -->
144144
<MenuFlyoutSubItem
@@ -152,15 +152,15 @@
152152
Command="{x:Bind Commands.AddHorizontalPane, Mode=OneWay}"
153153
KeyboardAcceleratorTextOverride="{x:Bind Commands.AddHorizontalPane.HotKeyText, Mode=OneWay}"
154154
Text="{x:Bind Commands.AddHorizontalPane.Label}"
155-
ThemedIconStyle="{x:Bind Commands.AddHorizontalPane.ThemedIconStyle}" />
155+
ThemedIconStyle ="{x:Bind Commands.AddHorizontalPane.ThemedIconStyle}" />
156156

157157
<!-- Vertical -->
158158
<uc:MenuFlyoutItemWithThemedIcon
159159
x:Name="AddVerticalPaneTabActionButton"
160160
Command="{x:Bind Commands.AddVerticalPane, Mode=OneWay}"
161161
KeyboardAcceleratorTextOverride="{x:Bind Commands.AddVerticalPane.HotKeyText, Mode=OneWay}"
162162
Text="{x:Bind Commands.AddVerticalPane.Label}"
163-
ThemedIconStyle="{x:Bind Commands.AddVerticalPane.ThemedIconStyle}" />
163+
ThemedIconStyle ="{x:Bind Commands.AddVerticalPane.ThemedIconStyle}" />
164164
</MenuFlyoutSubItem.Items>
165165
</MenuFlyoutSubItem>
166166

@@ -177,7 +177,7 @@
177177
IsChecked="{x:Bind Commands.ArrangePanesHorizontally.IsOn, Mode=OneWay}"
178178
KeyboardAcceleratorTextOverride="{x:Bind Commands.ArrangePanesHorizontally.HotKeyText, Mode=OneWay}"
179179
Text="{x:Bind Commands.ArrangePanesHorizontally.Label}"
180-
ThemedIconStyle="{x:Bind Commands.ArrangePanesHorizontally.ThemedIconStyle}" />
180+
ThemedIconStyle ="{x:Bind Commands.ArrangePanesHorizontally.ThemedIconStyle}" />
181181

182182
<!-- Vertical -->
183183
<uc:ToggleMenuFlyoutItemWithThemedIcon
@@ -186,7 +186,7 @@
186186
IsChecked="{x:Bind Commands.ArrangePanesVertically.IsOn, Mode=OneWay}"
187187
KeyboardAcceleratorTextOverride="{x:Bind Commands.ArrangePanesVertically.HotKeyText, Mode=OneWay}"
188188
Text="{x:Bind Commands.ArrangePanesVertically.Label}"
189-
ThemedIconStyle="{x:Bind Commands.ArrangePanesVertically.ThemedIconStyle}" />
189+
ThemedIconStyle ="{x:Bind Commands.ArrangePanesVertically.ThemedIconStyle}" />
190190
</MenuFlyoutSubItem.Items>
191191
</MenuFlyoutSubItem>
192192

@@ -197,7 +197,7 @@
197197
Command="{x:Bind Commands.CloseActivePane}"
198198
KeyboardAcceleratorTextOverride="{x:Bind Commands.CloseActivePane.HotKeyText, Mode=OneWay}"
199199
Text="{x:Bind Commands.CloseActivePane.Label}"
200-
ThemedIconStyle="{x:Bind Commands.CloseActivePane.ThemedIconStyle}" />
200+
ThemedIconStyle ="{x:Bind Commands.CloseActivePane.ThemedIconStyle}" />
201201

202202
</MenuFlyout>
203203
</Button.Flyout>

0 commit comments

Comments
 (0)