1
0
Fork 0

Merge pull request #3300 from thyttan/widmsggrid

widmsggrid: fix drawing outside of widget field
master
Martin Boonk 2024-03-27 08:10:59 +01:00 committed by GitHub
commit 9b4714eac1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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",

View File

@ -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);