Don't prioritize SVG icons.

Instead, assume that any icon without a specified size can scale freely. This will typically still include SVGs.
This commit is contained in:
player-03
2022-09-01 03:36:22 -04:00
committed by GitHub
parent 3b985979ac
commit f177e62edf

View File

@@ -298,9 +298,11 @@ class IconHelper
for (icon in icons) for (icon in icons)
{ {
var iconDifference = icon.width - width + icon.height - height; 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) if (iconDifference < 0 && !acceptSmaller)