Skip to content

Commit 1c65f91

Browse files
committed
Format C# & use SG
1 parent 5af1e90 commit 1c65f91

File tree

6 files changed

+230
-388
lines changed

6 files changed

+230
-388
lines changed

src/Files.App.Controls/ThemedIcon/Data/ThemedIconColorType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Files.App.Controls
55
{
66
/// <summary>
77
/// Defines the IconColorTypes for <see cref="ThemedIcon"/> which sets the visual state
8-
/// to use the correct brush values which match system signal colours.
8+
/// to use the correct brush values which match system signal colors.
99
/// </summary>
1010
public enum ThemedIconColorType
1111
{

src/Files.App.Controls/ThemedIcon/Data/ThemedIconLayerType.cs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33

44
namespace Files.App.Controls
55
{
6-
/// <summary>
7-
/// Defines LayerTypes for <see cref="ThemedIcon"/>.
8-
/// </summary>
9-
public enum ThemedIconLayerType
10-
{
11-
/// <summary>
12-
/// The LayerType uses the Base color. Default state.
13-
/// </summary>
14-
Base,
15-
/// <summary>
16-
/// The LayerType uses the Alt color.
17-
/// </summary>
18-
Alt,
19-
/// <summary>
20-
/// The LayerType uses an Accented color.
21-
/// </summary>
22-
Accent,
23-
/// <summary>
24-
/// The LayerType uses a contrasting color for the Accented color.
25-
/// </summary>
26-
AccentContrast,
27-
}
28-
}
6+
/// <summary>
7+
/// Defines LayerTypes for <see cref="ThemedIcon"/>.
8+
/// </summary>
9+
public enum ThemedIconLayerType
10+
{
11+
/// <summary>
12+
/// The LayerType uses the Base color. Default state.
13+
/// </summary>
14+
Base,
15+
/// <summary>
16+
/// The LayerType uses the Alt color.
17+
/// </summary>
18+
Alt,
19+
/// <summary>
20+
/// The LayerType uses an Accented color.
21+
/// </summary>
22+
Accent,
23+
/// <summary>
24+
/// The LayerType uses a contrasting color for the Accented color.
25+
/// </summary>
26+
AccentContrast,
27+
}
28+
}
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// Copyright (c) 2024 Files Community
22
// Licensed under the MIT License. See the LICENSE.
33

4-
using System.Collections.Generic;
5-
64
namespace Files.App.Controls
75
{
8-
/// <summary>
9-
/// A collection of Layers for the ThemedIcon's Layered IconType
10-
/// </summary>
11-
public sealed class ThemedIconLayers : List<ThemedIconLayer>
12-
{
13-
}
14-
}
6+
/// <summary>
7+
/// A collection of Layers for the ThemedIcon's Layered IconType
8+
/// </summary>
9+
public sealed class ThemedIconLayers : List<ThemedIconLayer>
10+
{
11+
}
12+
}

src/Files.App.Controls/ThemedIcon/ThemedIconLayer/ThemedIconLayer.Consts.cs

Lines changed: 50 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,54 @@
77

88
namespace Files.App.Controls
99
{
10-
// Template Parts
11-
[TemplatePart(Name = LayerCanvasPart, Type = typeof(Canvas))]
12-
[TemplatePart(Name = LayerPathPart, Type = typeof(Path))]
13-
14-
// Icon Color Visual States
15-
[TemplateVisualState(Name = BaseStateName, GroupName = IconLayerColorStateGroupName)]
16-
[TemplateVisualState(Name = AltStateName, GroupName = IconLayerColorStateGroupName)]
17-
[TemplateVisualState(Name = AccentStateName, GroupName = IconLayerColorStateGroupName)]
18-
[TemplateVisualState(Name = AccentContrastStateName, GroupName = IconLayerColorStateGroupName)]
19-
20-
// Non Accent Color States
21-
[TemplateVisualState(Name = CriticalStateName, GroupName = IconLayerColorStateGroupName)]
22-
[TemplateVisualState(Name = CautionStateName, GroupName = IconLayerColorStateGroupName)]
23-
[TemplateVisualState(Name = SuccessStateName, GroupName = IconLayerColorStateGroupName)]
24-
[TemplateVisualState(Name = NeutralStateName, GroupName = IconLayerColorStateGroupName)]
25-
[TemplateVisualState(Name = CustomColorStateName, GroupName = IconLayerColorStateGroupName)]
26-
27-
// Non Accent Contrasting Color States
28-
[TemplateVisualState(Name = CriticalBGStateName, GroupName = IconLayerColorStateGroupName)]
29-
[TemplateVisualState(Name = CautionBGStateName, GroupName = IconLayerColorStateGroupName)]
30-
[TemplateVisualState(Name = SuccessBGStateName, GroupName = IconLayerColorStateGroupName)]
31-
[TemplateVisualState(Name = NeutralBGStateName, GroupName = IconLayerColorStateGroupName)]
32-
[TemplateVisualState(Name = CustomColorBGStateName, GroupName = IconLayerColorStateGroupName)]
33-
34-
35-
/// <summary>
36-
/// Displays a layer of <see cref="ThemedIcon"/> for <see cref="ThemedIconTypes.Layered"/> icon type.
37-
/// </summary>
38-
public partial class ThemedIconLayer
39-
{
40-
// Path Control Part
41-
internal const string LayerCanvasPart = "PART_LayerCanvas";
42-
internal const string LayerPathPart = "PART_LayerPath";
43-
44-
// Visual State Group Names
45-
internal const string IconLayerColorStateGroupName = "IconLayerColorStates";
46-
47-
// Icon Color Type Visual State Names
48-
internal const string BaseStateName = "Base";
49-
internal const string AltStateName = "Alt";
50-
internal const string AccentStateName = "Accent";
51-
internal const string AccentContrastStateName = "AccentContrast";
52-
53-
internal const string CriticalStateName = "Critical";
54-
internal const string CautionStateName = "Caution";
55-
internal const string SuccessStateName = "Success";
56-
internal const string NeutralStateName = "Neutral";
57-
internal const string CustomColorStateName = "Custom";
58-
59-
internal const string CriticalBGStateName = "CriticalBG";
60-
internal const string CautionBGStateName = "CautionBG";
61-
internal const string SuccessBGStateName = "SuccessBG";
62-
internal const string NeutralBGStateName = "NeutralBG";
63-
internal const string CustomColorBGStateName = "CustomBG";
64-
}
10+
// Template Parts
11+
[TemplatePart(Name = LayerCanvasPart, Type = typeof(Canvas))]
12+
[TemplatePart(Name = LayerPathPart, Type = typeof(Path))]
13+
// Icon Color Visual States
14+
[TemplateVisualState(Name = BaseStateName, GroupName = IconLayerColorStateGroupName)]
15+
[TemplateVisualState(Name = AltStateName, GroupName = IconLayerColorStateGroupName)]
16+
[TemplateVisualState(Name = AccentStateName, GroupName = IconLayerColorStateGroupName)]
17+
[TemplateVisualState(Name = AccentContrastStateName, GroupName = IconLayerColorStateGroupName)]
18+
// Non Accent Color States
19+
[TemplateVisualState(Name = CriticalStateName, GroupName = IconLayerColorStateGroupName)]
20+
[TemplateVisualState(Name = CautionStateName, GroupName = IconLayerColorStateGroupName)]
21+
[TemplateVisualState(Name = SuccessStateName, GroupName = IconLayerColorStateGroupName)]
22+
[TemplateVisualState(Name = NeutralStateName, GroupName = IconLayerColorStateGroupName)]
23+
[TemplateVisualState(Name = CustomColorStateName, GroupName = IconLayerColorStateGroupName)]
24+
// Non Accent Contrasting Color States
25+
[TemplateVisualState(Name = CriticalBGStateName, GroupName = IconLayerColorStateGroupName)]
26+
[TemplateVisualState(Name = CautionBGStateName, GroupName = IconLayerColorStateGroupName)]
27+
[TemplateVisualState(Name = SuccessBGStateName, GroupName = IconLayerColorStateGroupName)]
28+
[TemplateVisualState(Name = NeutralBGStateName, GroupName = IconLayerColorStateGroupName)]
29+
[TemplateVisualState(Name = CustomColorBGStateName, GroupName = IconLayerColorStateGroupName)]
30+
/// <summary>
31+
/// Displays a layer of <see cref="ThemedIcon"/> for <see cref="ThemedIconTypes.Layered"/> icon type.
32+
/// </summary>
33+
public partial class ThemedIconLayer
34+
{
35+
// Path Control Part
36+
internal const string LayerCanvasPart = "PART_LayerCanvas";
37+
internal const string LayerPathPart = "PART_LayerPath";
38+
39+
// Visual State Group Names
40+
internal const string IconLayerColorStateGroupName = "IconLayerColorStates";
41+
42+
// Icon Color Type Visual State Names
43+
internal const string BaseStateName = "Base";
44+
internal const string AltStateName = "Alt";
45+
internal const string AccentStateName = "Accent";
46+
internal const string AccentContrastStateName = "AccentContrast";
47+
48+
internal const string CriticalStateName = "Critical";
49+
internal const string CautionStateName = "Caution";
50+
internal const string SuccessStateName = "Success";
51+
internal const string NeutralStateName = "Neutral";
52+
internal const string CustomColorStateName = "Custom";
53+
54+
internal const string CriticalBGStateName = "CriticalBG";
55+
internal const string CautionBGStateName = "CautionBG";
56+
internal const string SuccessBGStateName = "SuccessBG";
57+
internal const string NeutralBGStateName = "NeutralBG";
58+
internal const string CustomColorBGStateName = "CustomBG";
59+
}
6560
}

0 commit comments

Comments
 (0)