bigger icons
parent
cee2d6b447
commit
dc7f2d0251
|
|
@ -55,13 +55,13 @@
|
||||||
let icon = apps[idx].icon;
|
let icon = apps[idx].icon;
|
||||||
let iconWidth = icon.width || 48;
|
let iconWidth = icon.width || 48;
|
||||||
let iconHeight = icon.height || 48;
|
let iconHeight = icon.height || 48;
|
||||||
let maxSize = 48;
|
let maxSize = 56;
|
||||||
let scale = Math.min(maxSize / iconWidth, maxSize / iconHeight);
|
let scale = Math.min(maxSize / iconWidth, maxSize / iconHeight);
|
||||||
let scaledHeight = Math.floor(iconHeight * scale);
|
let scaledHeight = Math.floor(iconHeight * scale);
|
||||||
|
|
||||||
// Center the icon horizontally
|
// Center the icon horizontally
|
||||||
let iconX = rect.x + (rect.w - iconWidth) / 2;
|
let iconX = rect.x + (rect.w - maxSize) / 2;
|
||||||
g.drawImage(icon, iconX, rect.y);
|
g.drawImage(icon, iconX, rect.y, { scale: scale });
|
||||||
|
|
||||||
// Draw app name
|
// Draw app name
|
||||||
let text = g.wrapString(apps[idx].name, rect.w).join('\n');
|
let text = g.wrapString(apps[idx].name, rect.w).join('\n');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue