Update app.js
parent
4504eb1f11
commit
c0a2bc24bb
|
|
@ -84,16 +84,16 @@
|
||||||
p.c++;
|
p.c++;
|
||||||
}
|
}
|
||||||
|
|
||||||
g.reset();
|
g.reset(); // also loads the current theme
|
||||||
|
|
||||||
if (pos.tl.c || pos.tr.c) {
|
if (pos.tl.c || pos.tr.c) {
|
||||||
g.setClipRect(0,h-24,w-1,h-1);
|
g.setClipRect(0,h-24,w-1,h-1);
|
||||||
g.reset();
|
g.reset(); // also (re)loads the current theme
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos.bl.c || pos.br.c) {
|
if (pos.bl.c || pos.br.c) {
|
||||||
g.setClipRect(0,h-24,w-1,h-1);
|
g.setClipRect(0,h-24,w-1,h-1);
|
||||||
g.reset();
|
g.reset(); // also (re)loads the current theme
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -137,7 +137,7 @@
|
||||||
/**** drawClockFace ****/
|
/**** drawClockFace ****/
|
||||||
|
|
||||||
function drawClockFace () {
|
function drawClockFace () {
|
||||||
g.setColor(1,1,1);
|
g.setColor(g.theme.fg);
|
||||||
g.setFont('Vector', 22);
|
g.setFont('Vector', 22);
|
||||||
|
|
||||||
g.setFontAlign(0,-1);
|
g.setFontAlign(0,-1);
|
||||||
|
|
@ -182,7 +182,7 @@
|
||||||
let MinutesAngle = (Minutes/60) * twoPi - Pi;
|
let MinutesAngle = (Minutes/60) * twoPi - Pi;
|
||||||
let SecondsAngle = (Seconds/60) * twoPi - Pi;
|
let SecondsAngle = (Seconds/60) * twoPi - Pi;
|
||||||
|
|
||||||
g.setColor('#FFFFFF');
|
g.setColor(g.theme.fg);
|
||||||
|
|
||||||
transformPolygon(HourHandPolygon, CenterX,CenterY, HoursAngle);
|
transformPolygon(HourHandPolygon, CenterX,CenterY, HoursAngle);
|
||||||
g.fillPoly(transformedPolygon);
|
g.fillPoly(transformedPolygon);
|
||||||
|
|
@ -205,12 +205,8 @@
|
||||||
|
|
||||||
let Timer;
|
let Timer;
|
||||||
function refreshDisplay () {
|
function refreshDisplay () {
|
||||||
g.clear();
|
g.clear(true); // also loads current theme
|
||||||
|
|
||||||
g.setColor(0,0,0);
|
|
||||||
g.fillRect(0,0, ScreenWidth,ScreenHeight);
|
|
||||||
|
|
||||||
g.setBgColor(1,1,1);
|
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
|
||||||
drawClockFace();
|
drawClockFace();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue