larger font for petrol
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -80,7 +80,7 @@ class PetrolAction extends ActionBase {
|
||||
ctx.fillText(this.config.fuelType, 98, 45);
|
||||
|
||||
// Price — middle, yellow
|
||||
const fSize = priceText.length > 6 ? 34 - priceText.length : 40;
|
||||
const fSize = priceText.length > 6 ? 38 : 46;
|
||||
ctx.fillStyle = '#f0c040';
|
||||
ctx.font = `bold ${fSize}px "Source Han Sans SC"`;
|
||||
ctx.fillText(priceText, 98, 105);
|
||||
@@ -90,7 +90,7 @@ class PetrolAction extends ActionBase {
|
||||
const arrow = delta > 0 ? '▲' : '▼';
|
||||
const color = delta > 0 ? '#ff6b6b' : '#6bff6b';
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user