1
0
Fork 0

Improve widget visibility

master
Marco Heiming 2022-01-05 19:38:18 +01:00
parent c87d1d1650
commit 9a5937a3eb
1 changed files with 4 additions and 6 deletions

View File

@ -41,7 +41,7 @@ const colorRed = '#ff0000';
const colorGreen = '#008000';
const colorBlue = '#0000ff';
const colorYellow = '#ffff00';
const widgetOffset = showWidgets ? 12 : 0;
const widgetOffset = showWidgets ? 14 : 0;
const h = g.getHeight() - widgetOffset;
const w = g.getWidth();
const hOffset = 30 - widgetOffset;
@ -55,9 +55,9 @@ const radiusOuter = 22;
const radiusInner = 16;
function draw() {
g.reset();
g.clear(true);
g.setColor(colorBg);
g.fillRect(0, 0, w, h);
g.fillRect(0, widgetOffset, w, h);
// time
g.setFont("Vector:50");
@ -265,7 +265,7 @@ function shortValue(v) {
}
function getSteps() {
if (WIDGETS.wpedom !== undefined) {
if (WIDGETS && WIDGETS.wpedom !== undefined) {
return WIDGETS.wpedom.getSteps();
}
return 0;
@ -307,8 +307,6 @@ if (isCircleEnabled("battery")) {
});
}
g.clear();
Bangle.setUI("clock");
Bangle.loadWidgets();
if (!showWidgets) {