widget_utils for neonx

master
thyttan 2023-01-11 20:32:43 +01:00
parent 6bd6cdaa88
commit a50f8bf0f3
3 changed files with 6 additions and 4 deletions

View File

@ -3,3 +3,4 @@
0.03: Optional show lock status via color 0.03: Optional show lock status via color
0.04: Ensure that widgets are always hidden in fullscreen mode 0.04: Ensure that widgets are always hidden in fullscreen mode
0.05: Better lock/unlock animation 0.05: Better lock/unlock animation
0.06: Use widget_utils.

View File

@ -2,7 +2,7 @@
"id": "neonx", "id": "neonx",
"name": "Neon X & IO X Clock", "name": "Neon X & IO X Clock",
"shortName": "Neon X Clock", "shortName": "Neon X Clock",
"version": "0.05", "version": "0.06",
"description": "Pebble Neon X & Neon IO X for Bangle.js", "description": "Pebble Neon X & Neon IO X for Bangle.js",
"icon": "neonx.png", "icon": "neonx.png",
"type": "clock", "type": "clock",

View File

@ -19,6 +19,7 @@ let saved_settings = require('Storage').readJSON('neonx.json', 1) || settings;
for (const key in saved_settings) { for (const key in saved_settings) {
settings[key] = saved_settings[key] settings[key] = saved_settings[key]
} }
let widget_utils = require('widget_utils');
const digits = { const digits = {
@ -133,7 +134,7 @@ function drawAnimated(){
function _draw(date, xc){ function _draw(date, xc){
// Depending on the settings, we clear all widgets or draw those. // Depending on the settings, we clear all widgets or draw those.
if(settings.fullscreen){ if(settings.fullscreen){
for (let wd of WIDGETS) {wd.draw=()=>{};wd.area="";} widget_utils.hide();
} else { } else {
Bangle.drawWidgets(); Bangle.drawWidgets();
} }