Improve icon heuristics
This commit is contained in:
parent
cd62f76fc2
commit
0da1783c51
1 changed files with 10 additions and 2 deletions
|
@ -461,12 +461,20 @@ function selectIcon(icons)
|
||||||
{
|
{
|
||||||
for(var i=0; i < icons.length; i++)
|
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[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)
|
function isWaringState(printer)
|
||||||
|
|
Loading…
Reference in a new issue