Skip to content

Commit 9ca69ed

Browse files
author
thyttan
committed
bigclkinfo: use setUI; fix border off by one
1 parent f2ca265 commit 9ca69ed

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

apps/bigclkinfo/app.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55
let isClock = true; // TODO: make optional via setting.
66
if (isClock) {
7-
Bangle.CLOCK = 1;
8-
setWatch(() => {
9-
Bangle.showLauncher();
10-
}, BTN);
7+
Bangle.setUI("clock");
118
}
129

1310
// Load the clock infos
@@ -23,9 +20,9 @@ let clockInfoMenu = require("clock_info").addInteractive(clockInfoItems, {
2320
// info: data returned from itm.get() containing text/img/etc
2421
// options: options passed into addInteractive
2522
// Clear the background
26-
g.reset().clearRect(options.x, options.y, options.x+options.w-2, options.y+options.h-1);
23+
g.reset().clearRect(options.x, options.y, options.x+options.w-1, options.y+options.h-1);
2724
// indicate focus - we're using a border, but you could change color?
28-
if (options.focus) g.drawRect(options.x, options.y, options.x+options.w-2, options.y+options.h-1); // show if focused
25+
if (options.focus) g.drawRect(options.x, options.y, options.x+options.w-1, options.y+options.h-1); // show if focused
2926
// we're drawing center-aligned here
3027
var midx = options.x+options.w/2;
3128
let scale = 5;

0 commit comments

Comments
 (0)