Merge pull request #1062 from nebbishhacker/abatterywidget

a_battery_widget: support dark themes
master
Gordon Williams 2021-12-13 09:47:45 +00:00 committed by GitHub
commit fcffb710e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -4445,9 +4445,9 @@
"name": "A Battery Widget (with percentage)",
"shortName":"A Battery Widget",
"icon": "widget.png",
"version":"1.01",
"version":"1.02",
"type": "widget",
"supports": ["BANGLEJS2"],
"supports": ["BANGLEJS", "BANGLEJS2"],
"readme": "README.md",
"description": "Simple and slim battery widget with charge status and percentage",
"tags": "widget,battery",

View File

@ -1,2 +1,3 @@
1.00: Release for Bangle 2 (2021/11/18)
1.01: Internal id update to wid_* as per Gordon's request (2021/11/21)
1.02: Support dark themes

View File

@ -1,9 +1,9 @@
(function(){
let COLORS = {
'white': "#fff",
'black': "#000",
'white': g.theme.dark ? "#000" : "#fff",
'black': g.theme.dark ? "#fff" : "#000",
'charging': "#08f",
'high': "#000",
'high': g.theme.dark ? "#fff" : "#000",
'low': "#f00",
};