Skip to content

Commit

Permalink
Merge pull request #327 from MahApps/icons/MaterialIcons(Google)v4.0.0
Browse files Browse the repository at this point in the history
Update Material Icons (Google) to v4.0.0
  • Loading branch information
punker76 authored May 3, 2024
2 parents 93a8e7e + 90ce41f commit cce9606
Show file tree
Hide file tree
Showing 17 changed files with 16,866 additions and 1,939 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ This `IconPacks` library contains controls, markup extensions and converters to
| [Jam Icons](https://github.com/michaelampr/jam) | 3.1.0 | 940 | <a href="https://www.nuget.org/packages/MahApps.Metro.IconPacks.JamIcons/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/nuget/dt/MahApps.Metro.IconPacks.JamIcons.svg?style=flat-square&&label=JamIcons"></a> |
| [Material Design Icons](https://pictogrammers.com/library/mdi/) | 7.4.47 | 7447 | <a href="https://www.nuget.org/packages/MahApps.Metro.IconPacks.Material/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/nuget/dt/MahApps.Metro.IconPacks.Material.svg?style=flat-square&&label=Material"></a> |
| [Material Design Icons Light](https://github.com/Templarian/MaterialDesignLight) | 0.2.63 | 257 | <a href="https://www.nuget.org/packages/MahApps.Metro.IconPacks.MaterialLight/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/nuget/dt/MahApps.Metro.IconPacks.MaterialLight.svg?style=flat-square&&label=MaterialLight"></a> |
| [Material design icons (Google)](https://github.com/google/material-design-icons) | 3.0.1 | 932 | <a href="https://www.nuget.org/packages/MahApps.Metro.IconPacks.MaterialDesign/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/nuget/dt/MahApps.Metro.IconPacks.MaterialDesign.svg?style=flat-square&&label=MaterialDesign"></a> |
| [Material Icons (Google)](https://github.com/google/material-design-icons) | 4.0.0 | 8413 | <a href="https://www.nuget.org/packages/MahApps.Metro.IconPacks.MaterialDesign/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/nuget/dt/MahApps.Metro.IconPacks.MaterialDesign.svg?style=flat-square&&label=MaterialDesign"></a> |
| [Memory Icons](https://pictogrammers.com/library/memory/) | 1.5.0 | 651 | <a href="https://www.nuget.org/packages/MahApps.Metro.IconPacks.MemoryIcons/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/nuget/dt/MahApps.Metro.IconPacks.MemoryIcons.svg?style=flat-square&&label=MemoryIcons"></a> |
| [Microns](https://github.com/stephenhutchings/microns) | 1.0.10 | 108 | <a href="https://www.nuget.org/packages/MahApps.Metro.IconPacks.Microns/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/nuget/dt/MahApps.Metro.IconPacks.Microns.svg?style=flat-square&&label=Microns"></a> |
| [Modern UI Icons](https://github.com/Templarian/WindowsIcons) | | 1260 | <a href="https://www.nuget.org/packages/MahApps.Metro.IconPacks.Modern/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/nuget/dt/MahApps.Metro.IconPacks.Modern.svg?style=flat-square&&label=Modern"></a> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
namespace MahApps.Metro.IconPacks
{
/// <summary>
/// All icons sourced from Google Material Design icon font - <see><cref>http://google.github.io/material-design-icons/</cref></see>
/// Google Material Design are licensed under the Apache License 2.0 <see><cref>https://github.com/google/material-design-icons/blob/master/LICENSE</cref></see>
/// All icons sourced from Google Material Design icon font - <see><cref>https://github.com/google/material-design-icons</cref></see>
/// Google Material Design are licensed under the Apache License 2.0 <see><cref>https://github.com/google/material-design-icons?tab=Apache-2.0-1-ov-file#readme</cref></see>
/// </summary>
[MetaData("Material design icons (Google)", "http://google.github.io/material-design-icons/", "http://google.github.io/material-design-icons/#licensing")]
[MetaData("Material Icons (Google)", "https://github.com/google/material-design-icons", "https://github.com/google/material-design-icons?tab=Apache-2.0-1-ov-file#readme")]
public class PackIconMaterialDesign : PackIconControlBase
{
public static readonly DependencyProperty KindProperty
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,5 @@ protected override string GetPathData(object iconKind)
}
return data;
}

/// <inheritdoc />
protected override ScaleTransform GetScaleTransform(object iconKind)
{
return new ScaleTransform(1, -1);
}
}
}
9,349 changes: 8,415 additions & 934 deletions src/MahApps.Metro.IconPacks/Icons/MaterialDesign/PackIconMaterialDesignKind.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Windows.Media;

namespace MahApps.Metro.IconPacks.Converter
namespace MahApps.Metro.IconPacks.Converter
{
public class PackIconMaterialDesignKindToImageConverter : PackIconKindToImageConverterBase
{
Expand All @@ -14,11 +12,5 @@ protected override string GetPathData(object iconKind)
}
return data;
}

/// <inheritdoc />
protected override ScaleTransform GetScaleTransform(object iconKind)
{
return new ScaleTransform(1, -1);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
namespace MahApps.Metro.IconPacks
{
/// <summary>
/// All icons sourced from Google Material Design icon font - <see><cref>http://google.github.io/material-design-icons/</cref></see>
/// Google Material Design are licensed under the Apache License 2.0 <see><cref>https://github.com/google/material-design-icons/blob/master/LICENSE</cref></see>
/// All icons sourced from Google Material Design icon font - <see><cref>https://github.com/google/material-design-icons</cref></see>
/// Google Material Design are licensed under the Apache License 2.0 <see><cref>https://github.com/google/material-design-icons?tab=Apache-2.0-1-ov-file#readme</cref></see>
/// </summary>
[MetaData("Material design icons (Google)", "http://google.github.io/material-design-icons/", "http://google.github.io/material-design-icons/#licensing")]
[MetaData("Material Icons (Google)", "https://github.com/google/material-design-icons", "https://github.com/google/material-design-icons?tab=Apache-2.0-1-ov-file#readme")]
public class PathIconMaterialDesign : PathIconControlBase
{
public static readonly DependencyProperty KindProperty
Expand All @@ -36,9 +36,6 @@ public PackIconMaterialDesignKind Kind

public PathIconMaterialDesign()
{
var transformGroup = this.RenderTransform as TransformGroup ?? new TransformGroup();
var scaleTransform = new ScaleTransform() {ScaleY = -1};
transformGroup.Children.Insert(0, scaleTransform);
}

protected override void UpdateData()
Expand Down
22 changes: 11 additions & 11 deletions src/MahApps.Metro.IconPacks/MahApps.Metro.IconPacks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<ProjectReference Include="MahApps.Metro.IconPacks.ForkAwesome.csproj" />
<ProjectReference Include="MahApps.Metro.IconPacks.Ionicons.csproj" />
<ProjectReference Include="MahApps.Metro.IconPacks.JamIcons.csproj" />
<ProjectReference Include="MahApps.Metro.IconPacks.MaterialDesign.csproj" />
<ProjectReference Include="MahApps.Metro.IconPacks.Material.csproj" />
<ProjectReference Include="MahApps.Metro.IconPacks.MaterialLight.csproj" />
<ProjectReference Include="MahApps.Metro.IconPacks.MaterialDesign.csproj" />
<ProjectReference Include="MahApps.Metro.IconPacks.MemoryIcons.csproj" />
<ProjectReference Include="MahApps.Metro.IconPacks.Microns.csproj" />
<ProjectReference Include="MahApps.Metro.IconPacks.Modern.csproj" />
Expand Down Expand Up @@ -228,16 +228,6 @@
<TargetPath>MahApps.Metro.IconPacks.JamIcons\Themes\Generic.xaml</TargetPath>
</BuildOutputInPackage>

<BuildOutputInPackage Include="$(OutDir)MahApps.Metro.IconPacks.MaterialDesign\*.*">
<TargetPath>MahApps.Metro.IconPacks.MaterialDesign</TargetPath>
</BuildOutputInPackage>
<BuildOutputInPackage Include="$(OutDir)MahApps.Metro.IconPacks.MaterialDesign\Themes\PackIconMaterialDesign.xaml">
<TargetPath>MahApps.Metro.IconPacks.MaterialDesign\Themes\PackIconMaterialDesign.xaml</TargetPath>
</BuildOutputInPackage>
<BuildOutputInPackage Include="$(OutDir)MahApps.Metro.IconPacks.MaterialDesign\Themes\Generic.xaml">
<TargetPath>MahApps.Metro.IconPacks.MaterialDesign\Themes\Generic.xaml</TargetPath>
</BuildOutputInPackage>

<BuildOutputInPackage Include="$(OutDir)MahApps.Metro.IconPacks.Material\*.*">
<TargetPath>MahApps.Metro.IconPacks.Material</TargetPath>
</BuildOutputInPackage>
Expand All @@ -258,6 +248,16 @@
<TargetPath>MahApps.Metro.IconPacks.MaterialLight\Themes\Generic.xaml</TargetPath>
</BuildOutputInPackage>

<BuildOutputInPackage Include="$(OutDir)MahApps.Metro.IconPacks.MaterialDesign\*.*">
<TargetPath>MahApps.Metro.IconPacks.MaterialDesign</TargetPath>
</BuildOutputInPackage>
<BuildOutputInPackage Include="$(OutDir)MahApps.Metro.IconPacks.MaterialDesign\Themes\PackIconMaterialDesign.xaml">
<TargetPath>MahApps.Metro.IconPacks.MaterialDesign\Themes\PackIconMaterialDesign.xaml</TargetPath>
</BuildOutputInPackage>
<BuildOutputInPackage Include="$(OutDir)MahApps.Metro.IconPacks.MaterialDesign\Themes\Generic.xaml">
<TargetPath>MahApps.Metro.IconPacks.MaterialDesign\Themes\Generic.xaml</TargetPath>
</BuildOutputInPackage>

<BuildOutputInPackage Include="$(OutDir)MahApps.Metro.IconPacks.MemoryIcons\*.*">
<TargetPath>MahApps.Metro.IconPacks.MemoryIcons</TargetPath>
</BuildOutputInPackage>
Expand Down
6 changes: 3 additions & 3 deletions src/MahApps.Metro.IconPacks/PackIconControlDataFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ internal static IDictionary<Enum, string> Create()
{
dictionary.Add(packIcon.Key, packIcon.Value);
}
foreach (var packIcon in PackIconMaterialDesignDataFactory.Create())
foreach (var packIcon in PackIconMaterialDataFactory.Create())
{
dictionary.Add(packIcon.Key, packIcon.Value);
}
foreach (var packIcon in PackIconMaterialDataFactory.Create())
foreach (var packIcon in PackIconMaterialLightDataFactory.Create())
{
dictionary.Add(packIcon.Key, packIcon.Value);
}
foreach (var packIcon in PackIconMaterialLightDataFactory.Create())
foreach (var packIcon in PackIconMaterialDesignDataFactory.Create())
{
dictionary.Add(packIcon.Key, packIcon.Value);
}
Expand Down
12 changes: 6 additions & 6 deletions src/MahApps.Metro.IconPacks/PackIconExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ public override object ProvideValue(IServiceProvider serviceProvider)
return this.GetPackIcon<PackIconJamIcons, PackIconJamIconsKind>((PackIconJamIconsKind) this.Kind);
}
#endif
#if ALL || MATERIALDESIGN
if (this.Kind is PackIconMaterialDesignKind)
{
return this.GetPackIcon<PackIconMaterialDesign, PackIconMaterialDesignKind>((PackIconMaterialDesignKind) this.Kind);
}
#endif
#if ALL || MATERIAL
if (this.Kind is PackIconMaterialKind)
{
Expand All @@ -136,6 +130,12 @@ public override object ProvideValue(IServiceProvider serviceProvider)
return this.GetPackIcon<PackIconMaterialLight, PackIconMaterialLightKind>((PackIconMaterialLightKind) this.Kind);
}
#endif
#if ALL || MATERIALDESIGN
if (this.Kind is PackIconMaterialDesignKind)
{
return this.GetPackIcon<PackIconMaterialDesign, PackIconMaterialDesignKind>((PackIconMaterialDesignKind) this.Kind);
}
#endif
#if ALL || MEMORYICONS
if (this.Kind is PackIconMemoryIconsKind)
{
Expand Down
7 changes: 3 additions & 4 deletions src/MahApps.Metro.IconPacks/PackIconImageExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ protected override string GetPathData(object iconKind)
case PackIconJamIconsKind kind:
PackIconJamIconsDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
case PackIconMaterialDesignKind kind:
PackIconMaterialDesignDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
case PackIconMaterialKind kind:
PackIconMaterialDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
case PackIconMaterialLightKind kind:
PackIconMaterialLightDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
case PackIconMaterialDesignKind kind:
PackIconMaterialDesignDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
case PackIconMemoryIconsKind kind:
PackIconMemoryIconsDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
Expand Down Expand Up @@ -146,7 +146,6 @@ protected override ScaleTransform GetScaleTransform(object iconKind)
case PackIconFontistoKind _:
case PackIconForkAwesomeKind _:
case PackIconJamIconsKind _:
case PackIconMaterialDesignKind _:
case PackIconRadixIconsKind _:
case PackIconRPGAwesomeKind _:
case PackIconTypiconsKind _:
Expand Down
7 changes: 3 additions & 4 deletions src/MahApps.Metro.IconPacks/PackIconKindToImageConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ protected override string GetPathData(object iconKind)
case PackIconJamIconsKind kind:
PackIconJamIconsDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
case PackIconMaterialDesignKind kind:
PackIconMaterialDesignDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
case PackIconMaterialKind kind:
PackIconMaterialDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
case PackIconMaterialLightKind kind:
PackIconMaterialLightDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
case PackIconMaterialDesignKind kind:
PackIconMaterialDesignDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
case PackIconMemoryIconsKind kind:
PackIconMemoryIconsDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
return data;
Expand Down Expand Up @@ -126,7 +126,6 @@ protected override ScaleTransform GetScaleTransform(object iconKind)
case PackIconFontistoKind _:
case PackIconForkAwesomeKind _:
case PackIconJamIconsKind _:
case PackIconMaterialDesignKind _:
case PackIconRadixIconsKind _:
case PackIconRPGAwesomeKind _:
case PackIconTypiconsKind _:
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro.IconPacks/Themes/UAP/IconPacks.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.ForkAwesome/Themes/PackIconForkAwesome.xaml" />
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.Ionicons/Themes/PackIconIonicons.xaml" />
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.JamIcons/Themes/PackIconJamIcons.xaml" />
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.MaterialDesign/Themes/PackIconMaterialDesign.xaml" />
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.Material/Themes/PackIconMaterial.xaml" />
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.MaterialLight/Themes/PackIconMaterialLight.xaml" />
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.MaterialDesign/Themes/PackIconMaterialDesign.xaml" />
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.MemoryIcons/Themes/PackIconMemoryIcons.xaml" />
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.Microns/Themes/PackIconMicrons.xaml" />
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.Modern/Themes/PackIconModern.xaml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@
<Path Fill="{TemplateBinding Foreground}"
Stretch="Uniform"
Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
RenderTransformOrigin="0.5 0.5"
UseLayoutRounding="False">
<Path.RenderTransform>
<ScaleTransform ScaleY="-1" />
</Path.RenderTransform>
</Path>
UseLayoutRounding="False" />
</Viewbox>
</Grid>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro.IconPacks/Themes/WPF/IconPacks.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.ForkAwesome;component/Themes/PackIconForkAwesome.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.Ionicons;component/Themes/PackIconIonicons.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.JamIcons;component/Themes/PackIconJamIcons.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.MaterialDesign;component/Themes/PackIconMaterialDesign.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.Material;component/Themes/PackIconMaterial.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.MaterialLight;component/Themes/PackIconMaterialLight.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.MaterialDesign;component/Themes/PackIconMaterialDesign.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.MemoryIcons;component/Themes/PackIconMemoryIcons.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.Microns;component/Themes/PackIconMicrons.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.Modern;component/Themes/PackIconModern.xaml" />
Expand Down
7 changes: 0 additions & 7 deletions src/MahApps.Metro.IconPacks/Themes/WPF/PackIconControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Kind, Converter={converter:DataTypeValueConverter}}" Value="{x:Type iconPacks:PackIconMaterialDesignKind}">
<Setter TargetName="PART_IconPath" Property="LayoutTransform">
<Setter.Value>
<ScaleTransform ScaleY="-1" />
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Kind, Converter={converter:DataTypeValueConverter}}" Value="{x:Type iconPacks:PackIconRadixIconsKind}">
<Setter TargetName="PART_IconPath" Property="LayoutTransform">
<Setter.Value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@
Stretch="Uniform"
Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
SnapsToDevicePixels="False"
UseLayoutRounding="False">
<Path.LayoutTransform>
<ScaleTransform ScaleY="-1" />
</Path.LayoutTransform>
</Path>
UseLayoutRounding="False" />
</Viewbox>
</Grid>
</Grid>
Expand Down

0 comments on commit cce9606

Please sign in to comment.