twotwoclock 0.02: Clockinfos now save under correct name, and wrap correctly to >1 line

pull/3532/head
Gordon Williams 2024-08-02 15:48:15 +01:00
parent 8d602d2669
commit e069a3870c
3 changed files with 6 additions and 5 deletions

View File

@ -1 +1,2 @@
0.01: New Clock!
0.02: Clockinfos now save under correct name, and wrap correctly to >1 line

View File

@ -134,8 +134,8 @@ for (var i=0;i<10;i++)
if (g.stringWidth(txt) > options.w) // if too big, smaller font
g.setFont("LECO1976Regular14");
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)?"...":"";
var l = g.wrapString(txt, options.w-4);
txt = l.slice(0,2).join("\n") + ((l.length>2)?"...":"");
}
var x = options.x+options.w/2, y = options.y+54;
g.setColor(g.theme.bg).drawString(txt, x-2, y). // draw the text background
@ -147,12 +147,12 @@ for (var i=0;i<10;i++)
};
clockInfoMenuA = require("clock_info").addInteractive(clockInfoItems, {
app:"pebblepp",
app:"twotwoclock",
x : g.getWidth()-clockInfoW, y: 0, w: clockInfoW, h:clockInfoH,
draw : clockInfoDraw
});
clockInfoMenuB = require("clock_info").addInteractive(clockInfoItems, {
app:"pebblepp",
app:"twotwoclock",
x : g.getWidth()-clockInfoW, y: clockInfoH, w: clockInfoW, h:clockInfoH,
draw : clockInfoDraw
});

View File

@ -1,7 +1,7 @@
{ "id": "twotwoclock",
"name": "TwoTwo Clock",
"shortName":"22 Clock",
"version":"0.01",
"version":"0.02",
"description": "A clock with the time split over two lines, with custom backgrounds and two ClockInfos",
"icon": "icon.png",
"type": "clock",