VRR-Monitor: show original time and the delay in red

Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
This commit is contained in:
Benny Samir Hierl 2020-10-24 20:16:05 +02:00
parent eac7ccb7f8
commit f4b2a3cd0c
No known key found for this signature in database
GPG key ID: 69DE3C3C097DB7F7

View file

@ -3,9 +3,11 @@
// icon-color: deep-green; icon-glyph: bus-alt;
/**************
Version 1.1.0
Version 1.2.0
Changelog:
v1.2.0:
- show original time and the delay in red
v1.1.0:
- Line filter support added
- Setup Wizard enhanced
@ -257,7 +259,7 @@ widget.addSpacer(10)
let row = widget.addStack()
row.layoutHorizontally()
row.spacing = 15
row.spacing = 10
let timeColumn = row.addStack()
timeColumn.layoutVertically();
@ -269,12 +271,22 @@ let directionColumn = row.addStack()
directionColumn.layoutVertically()
data.forEach(function(l) {
let timeText = timeColumn.addText(`${l.hour}:${l.minute}`)
let timeStack = timeColumn.addStack()
timeStack.layoutHorizontally()
timeStack.spacing = 2
let timeText = timeStack.addText(`${l.orgHour}:${l.orgMinute}`)
timeText.font = Font.mediumSystemFont(12)
timeText.textColor = new Color(textColor)
timeText.leftAlignText()
if (parseInt(l.delay) > 0) {
let delayText = timeStack.addText(`+${l.delay}`)
delayText.font = Font.mediumSystemFont(12)
delayText.textColor = Color.red()
delayText.leftAlignText()
}
let lineText = lineColumn.addText(l.name)
lineText.font = Font.mediumSystemFont(12)
lineText.textColor = new Color(textColor)