diff --git a/apps/pebblepp/ChangeLog b/apps/pebblepp/ChangeLog index f3886a42e..83be498bd 100644 --- a/apps/pebblepp/ChangeLog +++ b/apps/pebblepp/ChangeLog @@ -1,4 +1,5 @@ 0.01: First release 0.02: clock_info now uses app name to maintain settings specifically for this clock face ensure clockinfo text is usppercase (font doesn't render lowercase) -0.03: Use smaller font if clock_info test doesn't fit in area \ No newline at end of file +0.03: Use smaller font if clock_info test doesn't fit in area +0.04: Ensure we only scale down clockinfo text if it really won't fit \ No newline at end of file diff --git a/apps/pebblepp/app.js b/apps/pebblepp/app.js index 5121f450e..330d79618 100644 --- a/apps/pebblepp/app.js +++ b/apps/pebblepp/app.js @@ -97,10 +97,10 @@ let clockInfoDraw = (itm, info, options) => { } g.setFontLECO1976Regular22().setFontAlign(0, 0); var txt = info.text.toString().toUpperCase(); - if (g.stringWidth(txt) > options.w-4) // if too big, smaller font + if (g.stringWidth(txt) > options.w) // if too big, smaller font g.setFontLECO1976Regular14(); - if (g.stringWidth(txt) > options.w-4) {// if still too big, split to 2 lines - var l = g.wrapString(txt, options.w-2); + if (g.stringWidth(txt) > options.w) {// if still too big, split to 2 lines + var l = g.wrapString(txt, options.w); txt = l.slice(0,2).join("\n") + (l.length>2)?"...":""; } g.drawString(txt, midx,options.y+options.h-12); // draw the text diff --git a/apps/pebblepp/metadata.json b/apps/pebblepp/metadata.json index 881b558db..e2be44ea0 100644 --- a/apps/pebblepp/metadata.json +++ b/apps/pebblepp/metadata.json @@ -2,7 +2,7 @@ "id": "pebblepp", "name": "Pebble++ Clock", "shortName": "Pebble++", - "version": "0.03", + "version": "0.04", "description": "A pebble style clock (based on the 'Pebble Clock' app) but with two configurable ClockInfo items at the top", "icon": "app.png", "screenshots": [{"url":"screenshot.png"}],