diff --git a/apps/lcdclock/ChangeLog b/apps/lcdclock/ChangeLog index df68cb17e..4b9e4ebc1 100644 --- a/apps/lcdclock/ChangeLog +++ b/apps/lcdclock/ChangeLog @@ -4,3 +4,4 @@ 0.04: clock_info is loaded before widgets to match other clocks 0.05: fix alignment of clock items caused by 0.04 (fix #2970) 0.06: Minor code improvements +0.07: fix special characters in clockinfo menus diff --git a/apps/lcdclock/app.js b/apps/lcdclock/app.js index 77e1afdf0..bf0ea83e9 100644 --- a/apps/lcdclock/app.js +++ b/apps/lcdclock/app.js @@ -38,7 +38,7 @@ let clockInfoDraw = (itm, info, options) => { if (info.img) g.drawImage(info.img, options.x+2, options.y+2); var title = clockInfoItems[options.menuA].name; - var text = info.text.toString().toUpperCase(); + var text = info.text.toString().toUpperCase().replace(/[^A-Z0-9]/g, ""); if (title!="Bangle") g.setFontAlign(1,0).drawString(title.toUpperCase(), options.x+options.w-2, options.y+14); if (g.setFont("7Seg:2").stringWidth(text)+8>options.w) g.setFont("7Seg"); g.setFontAlign(0,0).drawString(text, options.x+options.w/2, options.y+40); @@ -82,4 +82,4 @@ Bangle.drawWidgets(); let clockInfoItems = require("clock_info").load(); let clockInfoMenu = require("clock_info").addInteractive(clockInfoItems, { app:"lcdclock", x:R.x, y:R.y, w:midX-2, h:barY-R.y-2, draw : clockInfoDraw}); let clockInfoMenu2 = require("clock_info").addInteractive(clockInfoItems, { app:"lcdclock", x:midX+2, y:R.y, w:midX-3, h:barY-R.y-2, draw : clockInfoDraw}); -} \ No newline at end of file +} diff --git a/apps/lcdclock/metadata.json b/apps/lcdclock/metadata.json index d1ab47d8a..5413a8f2f 100644 --- a/apps/lcdclock/metadata.json +++ b/apps/lcdclock/metadata.json @@ -1,6 +1,6 @@ { "id": "lcdclock", "name": "LCD Clock", - "version": "0.06", + "version": "0.07", "description": "A Casio-style clock, with ClockInfo areas at the top and bottom. Tap them and swipe up/down to toggle between different information", "icon": "app.png", "screenshots": [{"url":"screenshot.png"}], diff --git a/apps/lcdclockplus/ChangeLog b/apps/lcdclockplus/ChangeLog index 7727f3cc4..1348999aa 100644 --- a/apps/lcdclockplus/ChangeLog +++ b/apps/lcdclockplus/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Minor code improvements +0.03: fix special characters in clockinfo menus diff --git a/apps/lcdclockplus/app.js b/apps/lcdclockplus/app.js index 4bf48b585..d5cad352d 100644 --- a/apps/lcdclockplus/app.js +++ b/apps/lcdclockplus/app.js @@ -51,7 +51,7 @@ let clockInfoDraw = (itm, info, options) => { if (info.img) { g.drawImage(info.img, options.x+1,options.y+2); } - var text = info.text.toString().toUpperCase(); + var text = info.text.toString().toUpperCase().replace(/[^A-Z0-9]/g, ""); if (g.setFont("7Seg:2").stringWidth(text)+24-2>options.w) g.setFont("7Seg"); g.setFontAlign(0,-1).drawString(text, options.x+options.w/2+13, options.y+6); }; diff --git a/apps/lcdclockplus/metadata.json b/apps/lcdclockplus/metadata.json index a25d5e6d5..b0187f800 100644 --- a/apps/lcdclockplus/metadata.json +++ b/apps/lcdclockplus/metadata.json @@ -1,6 +1,6 @@ { "id": "lcdclockplus", "name": "LCD Clock Plus", - "version": "0.02", + "version": "0.03", "description": "A Casio-style clock, with four ClockInfo areas at the top and bottom. Tap them and swipe up/down and left/right to toggle between different information.", "icon": "app.png", "screenshots": [{"url":"screenshot.png"},{"url":"screenshot2.png"}],