1
0
Fork 0

Corrected Settings. Set Color for date always to white.

master
Stefan Kuehnel 2020-05-23 19:54:24 +02:00
parent f8a830c696
commit e253e9d2c2
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,6 @@ rowlights = [];
function drawBerlinClock() {
g.clear();
var now = new Date();
if (show_date) {
var yr = now.getFullYear();
@ -20,6 +19,7 @@ function drawBerlinClock() {
var day = now.getDate();
var dateString=`${yr}-${month<10?'0':''}${month}-${day<10?'0':''}${day}`;
var strWidth = g.stringWidth(dateString);
g.setColor(1,1,1);
g.drawString(dateString,(g.getWidth()-strWidth)/2,height+offset+2);
}
rowlights[0] = Math.floor(now.getHours() / 5);

View File

@ -9,7 +9,8 @@
'< Back': back,
'Show Date': {
value: settings.show_date||false,
onchange: (m) => {save('show_date', m)}
format: v => v?'On':'Off',
onchange: v => {save('show_date', v)}
}
};
E.showMenu(appMenu)