Skip to content

Commit cc2586e

Browse files
mdtaukyaira2
andauthored
Code Quality: Added AltDataStream Icon (#16452)
Co-authored-by: Yair <[email protected]>
1 parent 42cec2f commit cc2586e

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

src/Files.App.Controls/ThemedIcon/Styles/Icons.Misc16.xaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,36 @@
239239
</Setter>
240240
</Style>
241241

242+
243+
<Style
244+
x:Key="App.ThemedIcons.AltDataStream"
245+
BasedOn="{StaticResource DefaultThemedIconStyle}"
246+
TargetType="local:ThemedIcon">
247+
248+
249+
<Setter Property="IconSize" Value="16" />
250+
251+
<Setter Property="OutlineIconData" Value="M14.6,4.4l-3.9-3.9C10.4,0.2,10,0,9.6,0H6C4.9,0,4,0.9,4,2v4h1V2c0-0.6,0.4-1,1-1h3v3.5C9,5.3,9.7,6,10.5,6H14v7c0,0.6-0.4,1-1,1h-2c0,0.4-0.1,0.7-0.2,1H13c1.1,0,2-0.9,2-2V5.4C15,5,14.8,4.6,14.6,4.4z M10.5,5C10.2,5,10,4.8,10,4.5V1.2L13.8,5H10.5z M7.5,9h-5C2.2,9,2,9.2,2,9.5S2.2,10,2.5,10h5C7.8,10,8,9.8,8,9.5S7.8,9,7.5,9z M7.5,11h-5C2.2,11,2,11.2,2,11.5S2.2,12,2.5,12h5C7.8,12,8,11.8,8,11.5S7.8,11,7.5,11z M7.5,13h-5C2.2,13,2,13.2,2,13.5S2.2,14,2.5,14h5C7.8,14,8,13.8,8,13.5S7.8,13,7.5,13z M8,7H2C0.9,7,0,7.9,0,9v5c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V9C10,7.9,9.1,7,8,7z M9,14c0,0.6-0.4,1-1,1H2c-0.6,0-1-0.4-1-1V9c0-0.6,0.4-1,1-1h6c0.6,0,1,0.4,1,1V14z" />
252+
<Setter Property="FilledIconData" Value="M10.5,6C9.7,6,9,5.3,9,4.5V0H6C4.9,0,4,0.9,4,2v4h4c1.7,0,3,1.3,3,3v5c0,0.3-0.1,0.7-0.2,1l2.2,0c1.1,0,2-0.9,2-2V6H10.5z M10.5,5h4.2L10,0.2v4.2C10,4.8,10.2,5,10.5,5z M8,7H2C0.9,7,0,7.9,0,9v5c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V9C10,7.9,9.1,7,8,7z M7.5,14h-5C2.2,14,2,13.8,2,13.5S2.2,13,2.5,13h5C7.8,13,8,13.2,8,13.5S7.8,14,7.5,14z M7.5,12h-5C2.2,12,2,11.8,2,11.5S2.2,11,2.5,11h5C7.8,11,8,11.2,8,11.5S7.8,12,7.5,12z M7.5,10h-5C2.2,10,2,9.8,2,9.5S2.2,9,2.5,9h5C7.8,9,8,9.2,8,9.5S7.8,10,7.5,10z" />
253+
254+
<Setter Property="Layers">
255+
<Setter.Value>
256+
<local:ThemedIconLayers>
257+
<local:ThemedIconLayer
258+
LayerSize="16"
259+
LayerType="Alt"
260+
PathData="M9.5,0.5H6C5.2,0.5,4.5,1.2,4.5,2v4H8c1.7,0,3,1.3,3,3v5c0,0.2,0,0.3,0,0.5h2c0.8,0,1.5-0.7,1.5-1.5V5.5h-4c-0.6,0-1-0.4-1-1V0.5z" />
261+
<local:ThemedIconLayer
262+
LayerSize="16"
263+
LayerType="Base"
264+
PathData="M14.6,4.4l-3.9-3.9C10.4,0.2,10,0,9.6,0H6C4.9,0,4,0.9,4,2v4h1V2c0-0.6,0.4-1,1-1h3v3.5C9,5.3,9.7,6,10.5,6H14v7c0,0.6-0.4,1-1,1h-2c0,0.4-0.1,0.7-0.2,1H13c1.1,0,2-0.9,2-2V5.4C15,5,14.8,4.6,14.6,4.4z M10.5,5C10.2,5,10,4.8,10,4.5V1.2L13.8,5H10.5z M7.5,9h-5C2.2,9,2,9.2,2,9.5S2.2,10,2.5,10h5C7.8,10,8,9.8,8,9.5S7.8,9,7.5,9z M7.5,11h-5C2.2,11,2,11.2,2,11.5S2.2,12,2.5,12h5C7.8,12,8,11.8,8,11.5S7.8,11,7.5,11z M7.5,13h-5C2.2,13,2,13.2,2,13.5S2.2,14,2.5,14h5C7.8,14,8,13.8,8,13.5S7.8,13,7.5,13z" />
265+
<local:ThemedIconLayer
266+
LayerSize="16"
267+
LayerType="Accent"
268+
PathData="M10,9v5c0,1.1-0.9,2-2,2H2c-1.1,0-2-0.9-2-2V9c0-1.1,0.9-2,2-2h6C9.1,7,10,7.9,10,9zM9,9c0-0.6-0.4-1-1-1H2C1.4,8,1,8.4,1,9v5c0,0.6,0.4,1,1,1h6c0.6,0,1-0.4,1-1V9z" />
269+
</local:ThemedIconLayers>
270+
</Setter.Value>
271+
</Setter>
272+
</Style>
273+
242274
</ResourceDictionary>

src/Files.App/Actions/FileSystem/CreateAlternateDataStreamAction.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public string Label
1919
public string Description
2020
=> Strings.CreateAlternateDataStreamDescription.GetLocalizedResource();
2121

22+
public RichGlyph Glyph
23+
=> new RichGlyph(themedIconStyle: "App.ThemedIcons.AltDataStream");
24+
2225
public override bool IsExecutable =>
2326
context.HasSelection &&
2427
context.CanCreateItem &&

tests/Files.App.UITests/Views/ThemedIconPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ResourceDictionary>
1414
<Style
1515
x:Key="IconTest"
16-
BasedOn="{StaticResource App.ThemedIcons.PanelRightClose}"
16+
BasedOn="{StaticResource App.ThemedIcons.AltDataStream}"
1717
TargetType="controls:ThemedIcon">
1818
<Setter Property="IconSize" Value="16" />
1919
<Setter Property="Width" Value="16" />

0 commit comments

Comments
 (0)