1
0
Fork 0

WIDGET widbatpc:

0.15: Added option to always display the icon when charging (useful if 'hide if charge greater than' is enabled)
master
Jeroen Peters 2022-01-03 22:41:40 +01:00
parent 61797894af
commit 37c8fa0921
1 changed files with 4 additions and 1 deletions

View File

@ -68,8 +68,11 @@
var w = 40;
if (Bangle.isCharging() && setting('charger'))
w += 16;
if ((setting('alwaysoncharge') == false && Bangle.isCharging()) && E.getBattery() > setting('hideifmorethan'))
if (E.getBattery() > setting('hideifmorethan')) {
w = 0;
if( Bangle.isCharging() && setting('alwaysoncharge') === true)
w = 56;
}
var changed = WIDGETS["batpc"].width != w;
WIDGETS["batpc"].width = w;
return changed;