diff --git a/apps/clkinfoclk/ChangeLog b/apps/clkinfoclk/ChangeLog new file mode 100644 index 000000000..2286a7f70 --- /dev/null +++ b/apps/clkinfoclk/ChangeLog @@ -0,0 +1 @@ +0.01: New App! \ No newline at end of file diff --git a/apps/clkinfoclk/app.png b/apps/clkinfoclk/app.png new file mode 100644 index 000000000..cf057046b Binary files /dev/null and b/apps/clkinfoclk/app.png differ diff --git a/apps/clkinfoclk/clkinfo.js b/apps/clkinfoclk/clkinfo.js new file mode 100644 index 000000000..f98edb5e7 --- /dev/null +++ b/apps/clkinfoclk/clkinfo.js @@ -0,0 +1,27 @@ +(function() { + return { + name: "Bangle", + items: [ + { name : "Clock", + get : () => { + return { + text : require("locale").time(new Date(),1), + img : atob("FhaBAAAAAAPwAD/wA8DwHADgYMGDAwMMDAxgMBmAwGYDAZgOBmAcGYA4YwBjDAAMGABgcAOA8DwA/8AA/AAAAAA=") + }; + }, + show : function() { + this.interval = setTimeout(()=>{ + this.emit("redraw"); + this.interval = setInterval(()=>{ + this.emit("redraw"); + }, 60000); + }, 60000 - (Date.now() % 60000)); + }, + hide : function() { + clearInterval(this.interval); + this.interval = undefined; + } + } + ] + }; +}) diff --git a/apps/clkinfoclk/metadata.json b/apps/clkinfoclk/metadata.json new file mode 100644 index 000000000..8d676d0e0 --- /dev/null +++ b/apps/clkinfoclk/metadata.json @@ -0,0 +1,13 @@ +{ "id": "clkinfoclk", + "name": "Clockinfo Clock", + "version":"0.01", + "description": "This displays a clock *inside* a ClockInfo. This can be really handy for the [Clock Info Widget](https://banglejs.com/apps/?id=widclkinfo) where you might want the option to show a clock in the top bar of a non-clock app.", + "icon": "app.png", + "screenshots": [{"url":"screenshot.png"}], + "type": "clkinfo", + "tags": "clkinfo", + "supports" : ["BANGLEJS2"], + "storage": [ + {"name":"clkinfoclk.clkinfo.js","url":"clkinfo.js"} + ] +} diff --git a/apps/clkinfoclk/screenshot.png b/apps/clkinfoclk/screenshot.png new file mode 100644 index 000000000..00f4c0c9a Binary files /dev/null and b/apps/clkinfoclk/screenshot.png differ diff --git a/apps/widclkinfo/ChangeLog b/apps/widclkinfo/ChangeLog index 6c3b85b00..d621e012a 100644 --- a/apps/widclkinfo/ChangeLog +++ b/apps/widclkinfo/ChangeLog @@ -1,3 +1,4 @@ 0.01: New Widget! 0.02: Now use an app ID (to avoid conflicts with clocks that also use ClockInfo) -0.03: Fix widget clearing too far down \ No newline at end of file +0.03: Fix widget clearing too far down +0.04: If a small font is needed, use 6x8 but twice as high \ No newline at end of file diff --git a/apps/widclkinfo/metadata.json b/apps/widclkinfo/metadata.json index 4ba9b2444..628388f55 100644 --- a/apps/widclkinfo/metadata.json +++ b/apps/widclkinfo/metadata.json @@ -1,6 +1,6 @@ { "id": "widclkinfo", "name": "Clock Info Widget", - "version":"0.03", + "version":"0.04", "description": "Use 'Clock Info' in the Widget bar. Tap on the widget to select, then drag up/down/left/right to choose what information is displayed.", "icon": "widget.png", "screenshots" : [ { "url":"screenshot.png" }], diff --git a/apps/widclkinfo/widget.js b/apps/widclkinfo/widget.js index a802ba872..d51f0563f 100644 --- a/apps/widclkinfo/widget.js +++ b/apps/widclkinfo/widget.js @@ -42,7 +42,7 @@ if (!require("clock_info").loadCount) { // don't load if a clock_info was alread var availableWidth = o.x+clockInfoMenu.w - (x+2); g.setFont("6x8:2").setFontAlign(-1,0); if (g.stringWidth(clockInfoInfo.text) > availableWidth) - g.setFont("6x8"); + g.setFont("6x8:1x2"); g.drawString(clockInfoInfo.text, x+2,o.y+12); // draw the text } }