If two icons are equivalent, prefer the second.

This commit is contained in:
Joseph Cloutier
2021-12-14 13:33:54 -05:00
parent e848002f93
commit 455dd2017c

View File

@@ -281,7 +281,7 @@ class IconHelper
for (icon in icons) for (icon in icons)
{ {
if (icon.width == width && icon.height == height && (match == null || match.priority < icon.priority)) if (icon.width == width && icon.height == height && (match == null || match.priority <= icon.priority))
{ {
match = icon; match = icon;
} }
@@ -303,7 +303,7 @@ class IconHelper
iconDifference = 0; iconDifference = 0;
} }
if (iconDifference < matchDifference || iconDifference == matchDifference && icon.priority > match.priority) if (iconDifference < matchDifference || iconDifference == matchDifference && icon.priority >= match.priority)
{ {
match = icon; match = icon;
matchDifference = iconDifference; matchDifference = iconDifference;