Improve icon heuristics

This commit is contained in:
Anton Thomasson 2022-01-01 20:03:37 +01:00
parent cd62f76fc2
commit 0da1783c51

View file

@ -461,12 +461,20 @@ function selectIcon(icons)
{
for(var i=0; i < icons.length; i++)
{
if(endsWith("M.png", icons[i]) || endsWith("128x128.png", icons[i]))
if(endsWith("M.png", icons[i]) || endsWith("128.png", icons[i]) || endsWith("128.PNG", icons[i]))
{
return icons[i];
}
}
return icons[0];
// Icons must be 48, 128 or 256px and sorted by size, so if all 3 are provided we want the middle one
if(icons.length == 3)
{
return icons[1];
}
else
{
return icons[0];
}
}
function isWaringState(printer)