diff --git a/apps/messagegui/ChangeLog b/apps/messagegui/ChangeLog index 321c07be0..d849e9b6f 100644 --- a/apps/messagegui/ChangeLog +++ b/apps/messagegui/ChangeLog @@ -117,3 +117,4 @@ Remove workaround for 2v10 (>3 years ago) - assume everyone is on never firmware now 0.86: Default to showing message scroller (with title, bigger icon) 0.87: Make choosing of font size more repeatable +0.88: Adjust padding calculation so messages are spaced out properly even when using international fonts \ No newline at end of file diff --git a/apps/messagegui/app.js b/apps/messagegui/app.js index d47a43d65..d3c67401d 100644 --- a/apps/messagegui/app.js +++ b/apps/messagegui/app.js @@ -391,8 +391,6 @@ function showMessage(msgid, persist) { } } lines = g.setFont(bodyFont).wrapString(body, w); - if (lines.length<3) - lines.unshift(""); // if less lines, pad them out a bit at the top! } let negHandler,posHandler,rowLeftDraw,rowRightDraw; if (msg.negative) { @@ -432,12 +430,14 @@ function showMessage(msgid, persist) { } let fontHeight = g.setFont(bodyFont).getFontHeight(); let lineHeight = (fontHeight>25)?fontHeight:25; - if (title.includes("\n")) lineHeight=25; // ensure enough room for 2 lines of title in header + if (title.includes("\n") && lineHeight<25) lineHeight=25; // ensure enough room for 2 lines of title in header let linesPerRow = 2; if (fontHeight<17) { lineHeight = 16; linesPerRow = 3; } + if ((lines.length+4.5)*lineHeight < Bangle.appRect.h) + lines.unshift(""); // if less lines, pad them out a bit at the top! let rowHeight = lineHeight*linesPerRow; let textLineOffset = -(linesPerRow + ((rowLeftDraw||rowRightDraw)?1:0)); let msgIcon = require("messageicons").getImage(msg); diff --git a/apps/messagegui/metadata.json b/apps/messagegui/metadata.json index d2a2704c7..db54edb7e 100644 --- a/apps/messagegui/metadata.json +++ b/apps/messagegui/metadata.json @@ -2,7 +2,7 @@ "id": "messagegui", "name": "Message UI", "shortName": "Messages", - "version": "0.87", + "version": "0.88", "description": "Default app to display notifications from iOS and Gadgetbridge/Android", "icon": "app.png", "type": "app",