sparkline: unified coloring - vertical gradient from colorAt/thresholds, stroke line, 1px border, consistent 32px height
This commit is contained in:
parent
e1d20c2407
commit
c64373313d
6 changed files with 90 additions and 93 deletions
|
|
@ -86,18 +86,16 @@ Column {
|
|||
}
|
||||
}
|
||||
|
||||
// 24h history sparkline (area chart)
|
||||
// 24h charge history sparkline
|
||||
SparklineCanvas {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 12
|
||||
height: 44
|
||||
height: 32
|
||||
history: S.BatteryService.history
|
||||
color: root._stateColor
|
||||
strokeColor: root.accentColor
|
||||
active: root.active
|
||||
backgroundTint: 0.07
|
||||
areaMode: true
|
||||
thresholds: [
|
||||
{
|
||||
value: S.BatteryService.warnThresh,
|
||||
|
|
@ -160,12 +158,11 @@ Column {
|
|||
anchors.rightMargin: 12
|
||||
height: 24
|
||||
history: S.BatteryService.rateHistory
|
||||
color: root._stateColor
|
||||
strokeColor: root._stateColor
|
||||
colorAt: v => v >= 0 ? S.Theme.base0B : root._stateColor
|
||||
active: root.active
|
||||
maxValue: null
|
||||
minValue: null
|
||||
backgroundTint: 0.08
|
||||
colorFunction: v => v >= 0 ? S.Theme.base0B : root._stateColor
|
||||
}
|
||||
|
||||
// Health row
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue