Save theme and restore
With dark theme otherwise theme stays dark for Fast Loading. Also added to readme that the the font for the date is increased with setting to hide the battery.master
parent
eefd0c30cd
commit
8893d2431c
|
|
@ -21,5 +21,5 @@
|
|||
* date and battery can be printed both below hands (as if hands were physical) and above (more readable)
|
||||
* hour hand can be made slighly shorter to improve readability when minute hand is behind a number
|
||||
* show the weekday and not the year
|
||||
* hide the battery percentage
|
||||
* hide the battery percentage; the font for the date is increased since there is more space
|
||||
* dark theme (enabled by default); disable to follow system theme
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ const defaultSettings = {
|
|||
};
|
||||
const settings = Object.assign(defaultSettings, require('Storage').readJSON('andark.json',1)||{});
|
||||
|
||||
const origTheme = g.theme;
|
||||
if (settings.darkTheme) {
|
||||
g.setTheme({bg: "#000"});
|
||||
g.setTheme({fg: "#FFF"});
|
||||
|
|
@ -168,6 +169,7 @@ const drawScale = function() {
|
|||
Bangle.setUI({
|
||||
mode: "clock",
|
||||
remove: function() {
|
||||
if (settings.darkTheme) g.setTheme(origTheme);
|
||||
Bangle.removeListener('lcdPower', updateState);
|
||||
Bangle.removeListener('lock', updateState);
|
||||
Bangle.removeListener('charging', draw);
|
||||
|
|
|
|||
Loading…
Reference in New Issue