Skip to content

Commit 733f88a

Browse files
committed
Rename
1 parent 7174c41 commit 733f88a

File tree

13 files changed

+50
-50
lines changed

13 files changed

+50
-50
lines changed

src/Files.App/Actions/Display/LayoutAction.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ ContentPageContext.PageType is not ContentPageTypes.Home &&
190190
ContentPageContext.ShellPage?.InstanceViewModel.FolderSettings.LayoutMode is FolderLayoutModes layoutMode &&
191191
((layoutMode is FolderLayoutModes.DetailsView && UserSettingsService.LayoutSettingsService.DetailsViewSize > DetailsViewSizeKind.Compact) ||
192192
(layoutMode is FolderLayoutModes.ListView && UserSettingsService.LayoutSettingsService.ListViewSize > ListViewSizeKind.Compact) ||
193-
(layoutMode is FolderLayoutModes.CardView && UserSettingsService.LayoutSettingsService.CardViewSize > CardsViewSizeKind.Small) ||
193+
(layoutMode is FolderLayoutModes.CardsView && UserSettingsService.LayoutSettingsService.CardsViewSize > CardsViewSizeKind.Small) ||
194194
(layoutMode is FolderLayoutModes.GridView && UserSettingsService.LayoutSettingsService.GridViewSize > GridViewSizeKind.Small) ||
195195
(layoutMode is FolderLayoutModes.ColumnView && UserSettingsService.LayoutSettingsService.ColumnsViewSize > ColumnsViewSizeKind.Compact));
196196

@@ -218,7 +218,7 @@ private void UserSettingsService_PropertyChanged(object? sender, PropertyChanged
218218
case nameof(ILayoutSettingsService.ListViewSize):
219219
case nameof(ILayoutSettingsService.GridViewSize):
220220
case nameof(ILayoutSettingsService.ColumnsViewSize):
221-
case nameof(ILayoutSettingsService.CardViewSize):
221+
case nameof(ILayoutSettingsService.CardsViewSize):
222222
OnPropertyChanged(nameof(IsExecutable));
223223
break;
224224
}
@@ -236,9 +236,9 @@ public Task ExecuteAsync(object? parameter = null)
236236
if (UserSettingsService.LayoutSettingsService.ListViewSize > ListViewSizeKind.Compact)
237237
UserSettingsService.LayoutSettingsService.ListViewSize -= 1;
238238
break;
239-
case FolderLayoutModes.CardView:
240-
if (UserSettingsService.LayoutSettingsService.CardViewSize > CardsViewSizeKind.Small)
241-
UserSettingsService.LayoutSettingsService.CardViewSize -= 1;
239+
case FolderLayoutModes.CardsView:
240+
if (UserSettingsService.LayoutSettingsService.CardsViewSize > CardsViewSizeKind.Small)
241+
UserSettingsService.LayoutSettingsService.CardsViewSize -= 1;
242242
break;
243243
case FolderLayoutModes.GridView:
244244
if (UserSettingsService.LayoutSettingsService.GridViewSize > GridViewSizeKind.Small)
@@ -278,7 +278,7 @@ ContentPageContext.PageType is not ContentPageTypes.Home &&
278278
ContentPageContext.ShellPage?.InstanceViewModel.FolderSettings.LayoutMode is FolderLayoutModes layoutMode &&
279279
((layoutMode is FolderLayoutModes.DetailsView && UserSettingsService.LayoutSettingsService.DetailsViewSize < DetailsViewSizeKind.ExtraLarge) ||
280280
(layoutMode is FolderLayoutModes.ListView && UserSettingsService.LayoutSettingsService.ListViewSize < ListViewSizeKind.ExtraLarge) ||
281-
(layoutMode is FolderLayoutModes.CardView && UserSettingsService.LayoutSettingsService.CardViewSize < CardsViewSizeKind.ExtraLarge) ||
281+
(layoutMode is FolderLayoutModes.CardsView && UserSettingsService.LayoutSettingsService.CardsViewSize < CardsViewSizeKind.ExtraLarge) ||
282282
(layoutMode is FolderLayoutModes.GridView && UserSettingsService.LayoutSettingsService.GridViewSize < GridViewSizeKind.ExtraLarge) ||
283283
(layoutMode is FolderLayoutModes.ColumnView && UserSettingsService.LayoutSettingsService.ColumnsViewSize < ColumnsViewSizeKind.ExtraLarge));
284284

@@ -323,9 +323,9 @@ public Task ExecuteAsync(object? parameter = null)
323323
if (UserSettingsService.LayoutSettingsService.ListViewSize < ListViewSizeKind.ExtraLarge)
324324
UserSettingsService.LayoutSettingsService.ListViewSize += 1;
325325
break;
326-
case FolderLayoutModes.CardView:
327-
if (UserSettingsService.LayoutSettingsService.CardViewSize < CardsViewSizeKind.ExtraLarge)
328-
UserSettingsService.LayoutSettingsService.CardViewSize += 1;
326+
case FolderLayoutModes.CardsView:
327+
if (UserSettingsService.LayoutSettingsService.CardsViewSize < CardsViewSizeKind.ExtraLarge)
328+
UserSettingsService.LayoutSettingsService.CardsViewSize += 1;
329329
break;
330330
case FolderLayoutModes.GridView:
331331
if (UserSettingsService.LayoutSettingsService.GridViewSize < GridViewSizeKind.ExtraLarge)

src/Files.App/Data/Contexts/DisplayPage/DisplayPageContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private LayoutTypes GetLayoutType()
230230
{
231231
FolderLayoutModes.DetailsView => LayoutTypes.Details,
232232
FolderLayoutModes.ListView => LayoutTypes.List,
233-
FolderLayoutModes.CardView => LayoutTypes.Cards,
233+
FolderLayoutModes.CardsView => LayoutTypes.Cards,
234234
FolderLayoutModes.GridView => LayoutTypes.Grid,
235235
FolderLayoutModes.ColumnView => LayoutTypes.Columns,
236236
_ => throw new InvalidEnumArgumentException(),

src/Files.App/Data/Contracts/ILayoutSettingsService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ public interface ILayoutSettingsService : IBaseSettingsService, INotifyPropertyC
206206
ListViewSizeKind ListViewSize { get; set; }
207207

208208
/// <summary>
209-
/// Item size in the Card View
209+
/// Item size in the Cards View
210210
/// </summary>
211-
CardsViewSizeKind CardViewSize { get; set; }
211+
CardsViewSizeKind CardsViewSize { get; set; }
212212

213213
/// <summary>
214214
/// Item size in the Grid View

src/Files.App/Data/Enums/FolderLayoutModes.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public enum FolderLayoutModes
1616
ListView = 1,
1717

1818
/// <summary>
19-
/// Card view
19+
/// Cards view
2020
/// </summary>
21-
CardView = 2,
21+
CardsView = 2,
2222

2323
/// <summary>
2424
/// Column view

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal static class LocalizedEnumDescriptionFactory
1010
{
1111
private static Dictionary<DetailsViewSizeKind, string> DetailsViewSizeKinds { get; } = [];
1212
private static Dictionary<ListViewSizeKind, string> ListViewSizeKinds { get; } = [];
13-
private static Dictionary<CardsViewSizeKind, string> CardViewSizeKinds { get; } = [];
13+
private static Dictionary<CardsViewSizeKind, string> CardsViewSizeKinds { get; } = [];
1414
private static Dictionary<GridViewSizeKind, string> GridViewSizeKinds { get; } = [];
1515
private static Dictionary<ColumnsViewSizeKind, string> ColumnsViewSizeKinds { get; } = [];
1616

@@ -46,15 +46,15 @@ public static string Get(ListViewSizeKind value)
4646

4747
public static string Get(CardsViewSizeKind value)
4848
{
49-
if (CardViewSizeKinds.Count == 0)
49+
if (CardsViewSizeKinds.Count == 0)
5050
{
51-
CardViewSizeKinds.Add(CardsViewSizeKind.Small, Strings.Small.GetLocalizedResource());
52-
CardViewSizeKinds.Add(CardsViewSizeKind.Medium, Strings.Medium.GetLocalizedResource());
53-
CardViewSizeKinds.Add(CardsViewSizeKind.Large, Strings.Large.GetLocalizedResource());
54-
CardViewSizeKinds.Add(CardsViewSizeKind.ExtraLarge, Strings.ExtraLarge.GetLocalizedResource());
51+
CardsViewSizeKinds.Add(CardsViewSizeKind.Small, Strings.Small.GetLocalizedResource());
52+
CardsViewSizeKinds.Add(CardsViewSizeKind.Medium, Strings.Medium.GetLocalizedResource());
53+
CardsViewSizeKinds.Add(CardsViewSizeKind.Large, Strings.Large.GetLocalizedResource());
54+
CardsViewSizeKinds.Add(CardsViewSizeKind.ExtraLarge, Strings.ExtraLarge.GetLocalizedResource());
5555
}
5656

57-
var stringValue = CardViewSizeKinds.GetValueOrDefault(value)!;
57+
var stringValue = CardsViewSizeKinds.GetValueOrDefault(value)!;
5858
return stringValue;
5959
}
6060

src/Files.App/Helpers/Layout/LayoutPreferencesManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public Type GetLayoutType(string path, bool changeLayoutMode = true)
218218
{
219219
FolderLayoutModes.DetailsView => typeof(DetailsLayoutPage),
220220
FolderLayoutModes.ListView => typeof(GridLayoutPage),
221-
FolderLayoutModes.CardView => typeof(GridLayoutPage),
221+
FolderLayoutModes.CardsView => typeof(GridLayoutPage),
222222
FolderLayoutModes.GridView => typeof(GridLayoutPage),
223223
FolderLayoutModes.ColumnView => typeof(ColumnsLayoutPage),
224224
_ => typeof(DetailsLayoutPage)
@@ -257,9 +257,9 @@ public void ToggleLayoutModeCards(bool manuallySet)
257257
IsAdaptiveLayoutEnabled &= !manuallySet;
258258

259259
// Cards View
260-
LayoutMode = FolderLayoutModes.CardView;
260+
LayoutMode = FolderLayoutModes.CardsView;
261261

262-
LayoutModeChangeRequested?.Invoke(this, new LayoutModeEventArgs(FolderLayoutModes.CardView));
262+
LayoutModeChangeRequested?.Invoke(this, new LayoutModeEventArgs(FolderLayoutModes.CardsView));
263263
}
264264

265265
public void ToggleLayoutModeList(bool manuallySet)

src/Files.App/Helpers/Layout/LayoutSizeKindHelper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public static uint GetIconSize(FolderLayoutModes folderLayoutMode)
3838
FolderLayoutModes.ColumnView when LayoutSettingsService.ColumnsViewSize == ColumnsViewSizeKind.ExtraLarge => Constants.ShellIconSizes.Large,
3939

4040
// Card
41-
FolderLayoutModes.CardView when LayoutSettingsService.CardViewSize == CardsViewSizeKind.Small => 64,
42-
FolderLayoutModes.CardView when LayoutSettingsService.CardViewSize == CardsViewSizeKind.Medium => 64,
43-
FolderLayoutModes.CardView when LayoutSettingsService.CardViewSize == CardsViewSizeKind.Large => 80,
44-
FolderLayoutModes.CardView when LayoutSettingsService.CardViewSize == CardsViewSizeKind.ExtraLarge => 96,
41+
FolderLayoutModes.CardsView when LayoutSettingsService.CardsViewSize == CardsViewSizeKind.Small => 64,
42+
FolderLayoutModes.CardsView when LayoutSettingsService.CardsViewSize == CardsViewSizeKind.Medium => 64,
43+
FolderLayoutModes.CardsView when LayoutSettingsService.CardsViewSize == CardsViewSizeKind.Large => 80,
44+
FolderLayoutModes.CardsView when LayoutSettingsService.CardsViewSize == CardsViewSizeKind.ExtraLarge => 96,
4545

4646
// Grid
4747
FolderLayoutModes.GridView when LayoutSettingsService.GridViewSize <= GridViewSizeKind.Small => 96,

src/Files.App/Services/Settings/LayoutSettingsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public ListViewSizeKind ListViewSize
307307
set => Set(value);
308308
}
309309

310-
public CardsViewSizeKind CardViewSize
310+
public CardsViewSizeKind CardsViewSize
311311
{
312312
get => Get(CardsViewSizeKind.Small);
313313
set => Set(value);

src/Files.App/UserControls/InnerNavigationToolbar.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@
964964
ThumbToolTipValueConverter="{StaticResource CardsViewSizeKindEnumToHumanizedConverter}"
965965
TickFrequency="1"
966966
TickPlacement="BottomRight"
967-
Value="{x:Bind UserSettingsService.LayoutSettingsService.CardViewSize, Mode=TwoWay, Converter={StaticResource GenericEnumConverter}, ConverterParameter='1-1,2-2,3-3,4-4'}" />
967+
Value="{x:Bind UserSettingsService.LayoutSettingsService.CardsViewSize, Mode=TwoWay, Converter={StaticResource GenericEnumConverter}, ConverterParameter='1-1,2-2,3-3,4-4'}" />
968968

969969
<!-- Cards -->
970970
<Grid HorizontalAlignment="Stretch">

src/Files.App/ViewModels/ShellViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ private async Task LoadThumbnailAsync(ListedItem item, CancellationToken cancell
977977
var returnIconOnly = UserSettingsService.FoldersSettingsService.ShowThumbnails == false || thumbnailSize < 48;
978978

979979
// TODO Remove this property when all the layouts can support different icon sizes
980-
var useCurrentScale = folderSettings.LayoutMode == FolderLayoutModes.DetailsView || folderSettings.LayoutMode == FolderLayoutModes.ListView || folderSettings.LayoutMode == FolderLayoutModes.ColumnView || folderSettings.LayoutMode == FolderLayoutModes.CardView;
980+
var useCurrentScale = folderSettings.LayoutMode == FolderLayoutModes.DetailsView || folderSettings.LayoutMode == FolderLayoutModes.ListView || folderSettings.LayoutMode == FolderLayoutModes.ColumnView || folderSettings.LayoutMode == FolderLayoutModes.CardsView;
981981

982982
byte[]? result = null;
983983

0 commit comments

Comments
 (0)