Update VodafoneDE.js

Changed red to Vodafone gradient red/darkred
Added gradient for darkmode black/darkgrey
Changed text color of last update text for better readability
This commit is contained in:
Necriso 2020-10-21 21:29:54 +02:00 committed by GitHub
parent 9caaf96973
commit 0d7ba45b67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,7 +101,22 @@ try {
// Create Widget
let widget = new ListWidget();
widget.backgroundColor = new Color("#FD0000")
const gradient = new LinearGradient()
gradient.locations = [0, 1]
if (Device.isUsingDarkAppearance()){
gradient.colors = [
new Color("111111"),
new Color("222222")
]
} else {
gradient.colors = [
new Color("D32D1F"),
new Color("76150C")
]
}
widget.backgroundGradient = gradient
let provider = widget.addText("Vodafone")
provider.font = Font.mediumSystemFont(12)
@ -125,7 +140,7 @@ let lastUpdateText = widget.addDate(lastUpdate)
lastUpdateText.font = Font.mediumSystemFont(10)
lastUpdateText.centerAlignText()
lastUpdateText.applyTimeStyle()
lastUpdateText.textColor = Color.darkGray()
lastUpdateText.textColor = Color.lightGray()
if(!config.runsInWidget) {
await widget.presentSmall()
@ -133,4 +148,4 @@ if(!config.runsInWidget) {
// Tell the system to show the widget.
Script.setWidget(widget)
Script.complete()
}
}