larger font for petrol

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2026-04-10 12:25:51 +02:00
parent 46f36f662f
commit 7768109eb4
+2 -2
View File
@@ -80,7 +80,7 @@ class PetrolAction extends ActionBase {
ctx.fillText(this.config.fuelType, 98, 45); ctx.fillText(this.config.fuelType, 98, 45);
// Price — middle, yellow // Price — middle, yellow
const fSize = priceText.length > 6 ? 34 - priceText.length : 40; const fSize = priceText.length > 6 ? 38 : 46;
ctx.fillStyle = '#f0c040'; ctx.fillStyle = '#f0c040';
ctx.font = `bold ${fSize}px "Source Han Sans SC"`; ctx.font = `bold ${fSize}px "Source Han Sans SC"`;
ctx.fillText(priceText, 98, 105); ctx.fillText(priceText, 98, 105);
@@ -90,7 +90,7 @@ class PetrolAction extends ActionBase {
const arrow = delta > 0 ? '▲' : '▼'; const arrow = delta > 0 ? '▲' : '▼';
const color = delta > 0 ? '#ff6b6b' : '#6bff6b'; const color = delta > 0 ? '#ff6b6b' : '#6bff6b';
ctx.fillStyle = color; ctx.fillStyle = color;
ctx.font = '18px "Source Han Sans SC"'; ctx.font = '24px "Source Han Sans SC"';
ctx.fillText(`${arrow} ${Math.abs(delta).toFixed(3)}`, 98, 142); ctx.fillText(`${arrow} ${Math.abs(delta).toFixed(3)}`, 98, 142);
} }