Skip to content

Commit

Permalink
Change scaling factor for both dimensions to fit the icons size.
Browse files Browse the repository at this point in the history
  • Loading branch information
eiadxp committed Dec 7, 2021
1 parent 056564a commit b7e218c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MahApps.Metro.IconPacks.Core/PackIconCursorHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public static Geometry GetCursorGeometry(string pathData, TransformGroup transfo
transformGroup.Children.Add(new TranslateTransform(-rect.X, -rect.Y));

// Apply the requested size.
transformGroup.Children.Add(new ScaleTransform(width / rect.Width, height / rect.Height));
var d = Math.Min(width / rect.Width, height / rect.Height);
transformGroup.Children.Add(new ScaleTransform(d, d));


geometry.Freeze();
Expand Down

0 comments on commit b7e218c

Please sign in to comment.