From 1c85059df1501c83b78fe1c49620ecfd19e24a15 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 31 Mar 2025 16:53:16 +0100 Subject: [PATCH] 0.24: Fix Launcher when a custom font from 2v26+ is specified (fix #3787) --- apps/launch/ChangeLog | 3 ++- apps/launch/app.js | 4 ++-- apps/launch/metadata.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/launch/ChangeLog b/apps/launch/ChangeLog index 63d85715a..97dac67f6 100644 --- a/apps/launch/ChangeLog +++ b/apps/launch/ChangeLog @@ -22,4 +22,5 @@ 0.20: Use Bangle.showClock for changing to clock 0.21: Make the "App source not found" warning less buggy 0.22: Add less padding between launcher items, use new font if available in 2v26+ -0.23: Draw a placeholder screen right at the start to speed up apparent boot time \ No newline at end of file +0.23: Draw a placeholder screen right at the start to speed up apparent boot time +0.24: Fix Launcher when a custom font from 2v26+ is specified (fix #3787) \ No newline at end of file diff --git a/apps/launch/app.js b/apps/launch/app.js index 077a1c604..2d1720a6c 100644 --- a/apps/launch/app.js +++ b/apps/launch/app.js @@ -16,7 +16,7 @@ font = "Vector"+(vectorval).toString(); } else{ font = settings.font; - scaleval = (font.split("x")[1])/20; + scaleval = g.setFont(font).stringMetrics("X").height / 20; } } let height = 50*scaleval; @@ -100,4 +100,4 @@ if (!settings.fullscreen) // finally draw widgets Bangle.drawWidgets(); - } \ No newline at end of file +} \ No newline at end of file diff --git a/apps/launch/metadata.json b/apps/launch/metadata.json index 6fa856b96..4fbd72c6e 100644 --- a/apps/launch/metadata.json +++ b/apps/launch/metadata.json @@ -2,7 +2,7 @@ "id": "launch", "name": "Launcher", "shortName": "Launcher", - "version": "0.23", + "version": "0.24", "description": "This is needed to display a menu allowing you to choose your own applications. You can replace this with a customised launcher.", "readme": "README.md", "icon": "app.png",