weatherclock v0.06

master
lunctis-viribus 2023-02-26 14:37:16 +01:00
parent f3a28b2b4c
commit 35b4611a9c
3 changed files with 11 additions and 2 deletions

View File

@ -3,4 +3,4 @@
0.03: Minor layout extra spaces.
0.04: Layout now compatible with Bangle.js 2.
0.05: Use weather condition code for icon selection.
0.06: Dev4-New settings to hide the day of week, date and/or wind speed.
0.06: Dev5-New settings to hide the weather icon, day of week, date and/or wind speed.

View File

@ -134,6 +134,7 @@ let fontTemp = settings.wind ? "10%" : "20%";
let fontWind = settings.wind ? "10%" : "0%";
let labelDay = settings.day ? "THU" : "";
let labelDate = settings.date ? "01/01/1970" : "";
let srcWeather = settings.icon ? sunIcon : "";
var clockLayout = new Layout( {
type:"v", c: [
{type:"txt", font:"35%", halign: 0, fillx:1, pad: 8, label:"00:00", id:"time" },
@ -145,7 +146,7 @@ var clockLayout = new Layout( {
]
},
{type: "h", valign : 1, fillx:1, c: [
{type: "img", filly: 1, id: "weatherIcon", src: sunIcon},
{type: "img", filly: 1, id: "weatherIcon", src: srcWeather},
{type: "v", fillx:1, c: [
{type: "h", c: [
{type: "txt", font: fontTemp, id: "temp", label: "000 °C"},

View File

@ -3,6 +3,7 @@
// initialize with default settings...
let s = {
'icon': true,
'day': true,
'date': true,
'wind': true
@ -25,6 +26,13 @@
E.showMenu({
'': { 'title': 'Weather Clock' },
'< Back': back,
'Weather Icon': {
value: !!s.icon,
onchange: v => {
s.icon = v;
save();
},
},
'Day Of Week': {
value: !!s.day,
onchange: v => {