From eb73a84086925f6ead381d82ecac37cad748fdfe Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 27 Mar 2024 00:06:30 +0100 Subject: [PATCH] widmsggrid: fix drawing outside of widget field ... when the circle containing single digit numbers was drawn. --- apps/widmsggrid/ChangeLog | 1 + apps/widmsggrid/metadata.json | 2 +- apps/widmsggrid/widget.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/widmsggrid/ChangeLog b/apps/widmsggrid/ChangeLog index 544b4ff4f..0573b9677 100644 --- a/apps/widmsggrid/ChangeLog +++ b/apps/widmsggrid/ChangeLog @@ -3,3 +3,4 @@ 0.03: Use new message library 0.04: Remove library stub 0.05: Don't turn on LCD +0.06: Don't draw outside of widget field diff --git a/apps/widmsggrid/metadata.json b/apps/widmsggrid/metadata.json index 015da533c..75b859c3b 100644 --- a/apps/widmsggrid/metadata.json +++ b/apps/widmsggrid/metadata.json @@ -1,7 +1,7 @@ { "id": "widmsggrid", "name": "Messages Grid Widget", - "version": "0.05", + "version": "0.06", "description": "Widget that displays notification icons in a grid", "icon": "widget.png", "type": "widget", diff --git a/apps/widmsggrid/widget.js b/apps/widmsggrid/widget.js index c2f36a87d..dc444f782 100644 --- a/apps/widmsggrid/widget.js +++ b/apps/widmsggrid/widget.js @@ -52,7 +52,7 @@ if (w.total > 1) { // show total number of messages in bottom-right corner g.reset(); - if (w.total < 10) g.fillCircle(w.x + w.width - 5, w.y + 20, 4); // single digits get a round background, double digits fill their rectangle + if (w.total < 10) g.fillCircle(w.x + w.width - 5, w.y + 19, 4); // single digits get a round background, double digits fill their rectangle g.setColor(g.theme.bg).setBgColor(g.theme.fg) .setFont('6x8').setFontAlign(1, 1) .drawString(w.total, w.x + w.width - 1, w.y + 24, w.total > 9);