diff --git a/apps.json b/apps.json index 876b243ae..7cc5e67f7 100644 --- a/apps.json +++ b/apps.json @@ -653,7 +653,7 @@ "name": "Battery Level Widget (with percentage)", "shortName": "Battery Widget", "icon": "widget.png", - "version":"0.12", + "version":"0.13", "description": "Show the current battery level and charging status in the top right of the clock, with charge percentage", "tags": "widget,battery,b2", "type":"widget", diff --git a/apps/widbatpc/ChangeLog b/apps/widbatpc/ChangeLog index 64482db71..09e4fabf4 100644 --- a/apps/widbatpc/ChangeLog +++ b/apps/widbatpc/ChangeLog @@ -9,3 +9,4 @@ 0.10: Add 'hide if charge greater than' 0.11: Don't overwrite existing settings on app update 0.12: Fixed for Bangle 2 +0.13: Fillbar setting added, see README diff --git a/apps/widbatpc/README.md b/apps/widbatpc/README.md index 6e8fd10cc..c75154f72 100644 --- a/apps/widbatpc/README.md +++ b/apps/widbatpc/README.md @@ -4,5 +4,13 @@ Show the current battery level and charging status in the top right of the clock Works with Bangle 1 and Bangle 2 -![](screenshot.jpg) +When the fillbar setting is on the level colour will fill the entire +bar. This makes for an easier to read dsiplay when the charge is +below 50%. + +![](widbatpc.full.jpg) + +When the fillbar setting is off the level colour will follow the battry percentage + +![](widbatpc.part.jpg) diff --git a/apps/widbatpc/screenshot.jpg b/apps/widbatpc/screenshot.jpg deleted file mode 100644 index 48f9893ec..000000000 Binary files a/apps/widbatpc/screenshot.jpg and /dev/null differ diff --git a/apps/widbatpc/settings.js b/apps/widbatpc/settings.js index 009fa4994..b7a5db9e6 100644 --- a/apps/widbatpc/settings.js +++ b/apps/widbatpc/settings.js @@ -10,6 +10,7 @@ let s = { 'color': COLORS[0], 'percentage': true, + 'fillbar': false, 'charger': true, 'hideifmorethan': 100, } @@ -54,6 +55,11 @@ save('color')(s.color) } }, + 'Fill Bar': { + value: s.fillbar, + format: onOffFormat, + onchange: save('fillbar'), + }, 'Hide if >': { value: s.hideifmorethan||100, min: 10, diff --git a/apps/widbatpc/widbatpc.full.jpg b/apps/widbatpc/widbatpc.full.jpg new file mode 100644 index 000000000..3df2184fe Binary files /dev/null and b/apps/widbatpc/widbatpc.full.jpg differ diff --git a/apps/widbatpc/widbatpc.part.jpg b/apps/widbatpc/widbatpc.part.jpg new file mode 100644 index 000000000..d59276e22 Binary files /dev/null and b/apps/widbatpc/widbatpc.part.jpg differ diff --git a/apps/widbatpc/widget.js b/apps/widbatpc/widget.js index 223db5f70..caecf8ae4 100644 --- a/apps/widbatpc/widget.js +++ b/apps/widbatpc/widget.js @@ -80,7 +80,12 @@ var s = 39; var x = this.x, y = this.y; const l = E.getBattery(); - const xl = x+4+l*(s-12)/100 + let xl = x+4+l*(s-12)/100; + + // show bar full in the level color, as you cant see the color if the bar is too small + if (setting('fillbar')) + xl = x+4+100*(s-12)/100; + c = levelColor(l); if (Bangle.isCharging() && setting('charger')) {