mirror of https://github.com/espruino/BangleApps
set theme to light, add black as an option for foreground color
parent
650add7c84
commit
852e25b189
|
@ -36,6 +36,10 @@ switch (settings.foregroundColor) {
|
||||||
foregroundColor = COLOUR_WHITE;
|
foregroundColor = COLOUR_WHITE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
foregroundColor = COLOUR_BLACK;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
foregroundColor = COLOUR_BLACK; // to detect problems
|
foregroundColor = COLOUR_BLACK; // to detect problems
|
||||||
break;
|
break;
|
||||||
|
@ -144,7 +148,7 @@ function draw() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear the screen once, at startup
|
// Clear the screen once, at startup
|
||||||
g.setTheme({ bg: COLOUR_VPW_GREEN, fg: foregroundColor, dark: true }).clear();
|
g.setTheme({ bg: COLOUR_VPW_GREEN, fg: foregroundColor, dark: false }).clear();
|
||||||
// draw immediately at first, queue update
|
// draw immediately at first, queue update
|
||||||
draw();
|
draw();
|
||||||
// Stop updates when LCD is off, restart when on
|
// Stop updates when LCD is off, restart when on
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
require('Storage').writeJSON(FILE, settings);
|
require('Storage').writeJSON(FILE, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
var foregroundColors = ["Red", "Purple", "White"];
|
var foregroundColors = ["Red", "Purple", "White", "Black"];
|
||||||
|
|
||||||
// Show the menu
|
// Show the menu
|
||||||
E.showMenu({
|
E.showMenu({
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
"< Back" : () => back(),
|
"< Back" : () => back(),
|
||||||
'Foreground color': {
|
'Foreground color': {
|
||||||
value: 0|settings.foregroundColor, // 0| converts undefined to 0
|
value: 0|settings.foregroundColor, // 0| converts undefined to 0
|
||||||
min: 0, max: 2,
|
min: 0, max: 3,
|
||||||
onchange: v => {
|
onchange: v => {
|
||||||
settings.foregroundColor = v;
|
settings.foregroundColor = v;
|
||||||
writeSettings();
|
writeSettings();
|
||||||
|
@ -25,4 +25,4 @@
|
||||||
format: function (v) {return foregroundColors[v];}
|
format: function (v) {return foregroundColors[v];}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
})
|
})
|
Loading…
Reference in New Issue