Screen: leds width border

This commit is contained in:
Louis-Joseph Fournier 2016-01-03 14:50:55 +01:00
parent b9520892b6
commit e0e717e9c5
2 changed files with 22 additions and 11 deletions

View file

@ -5,16 +5,27 @@ import QtGraphicalEffects 1.0
* Led: a circle color
*/
RadialGradient {
Rectangle {
property color led_color: "red"
gradient: Gradient {
GradientStop {
position: 0.0
color: led_color
}
GradientStop {
position: 0.5
color: "transparent"
property bool on: false
radius: width / 2
border.width: 1
border.color: "#80888888"
color: "#20888888"
RadialGradient {
anchors.fill: parent
visible: parent.on
gradient: Gradient {
GradientStop {
position: 0.0
color: led_color
}
GradientStop {
position: 0.5
color: "transparent"
}
}
}
}

View file

@ -33,7 +33,7 @@ Item {
width: meter.width / 12
height: width
led_color: dev_is_ok ? led_green : led_red
visible: tuner.found && (dev_is_ok || tuner.deviation < 0)
on: tuner.found && (dev_is_ok || tuner.deviation < 0)
}
Led {
@ -44,7 +44,7 @@ Item {
width: meter.width / 12
height: width
led_color: dev_is_ok ? led_green : led_red
visible: tuner.found && (dev_is_ok || tuner.deviation > 0)
on: tuner.found && (dev_is_ok || tuner.deviation > 0)
}
CircleMeter {