From f177e62edfd97ecbe5c2d900eef98c1957c3ae5b Mon Sep 17 00:00:00 2001 From: player-03 Date: Thu, 1 Sep 2022 03:36:22 -0400 Subject: [PATCH] Don't prioritize SVG icons. Instead, assume that any icon without a specified size can scale freely. This will typically still include SVGs. --- src/lime/tools/IconHelper.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lime/tools/IconHelper.hx b/src/lime/tools/IconHelper.hx index 1b862dd67..7db1dfdb1 100644 --- a/src/lime/tools/IconHelper.hx +++ b/src/lime/tools/IconHelper.hx @@ -298,9 +298,11 @@ class IconHelper for (icon in icons) { var iconDifference = icon.width - width + icon.height - height; - if (Path.extension(icon.path) == "svg") + + // If size is unspecified, accept it as an almost-perfect match + if (icon.width == 0 && icon.height == 0) { - iconDifference = 0; + iconDifference = 1; } if (iconDifference < 0 && !acceptSmaller)