Screen: leds width border
This commit is contained in:
parent
b9520892b6
commit
e0e717e9c5
2 changed files with 22 additions and 11 deletions
29
qml/Led.qml
29
qml/Led.qml
|
@ -5,16 +5,27 @@ import QtGraphicalEffects 1.0
|
||||||
* Led: a circle color
|
* Led: a circle color
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RadialGradient {
|
Rectangle {
|
||||||
property color led_color: "red"
|
property color led_color: "red"
|
||||||
gradient: Gradient {
|
property bool on: false
|
||||||
GradientStop {
|
|
||||||
position: 0.0
|
radius: width / 2
|
||||||
color: led_color
|
border.width: 1
|
||||||
}
|
border.color: "#80888888"
|
||||||
GradientStop {
|
color: "#20888888"
|
||||||
position: 0.5
|
|
||||||
color: "transparent"
|
RadialGradient {
|
||||||
|
anchors.fill: parent
|
||||||
|
visible: parent.on
|
||||||
|
gradient: Gradient {
|
||||||
|
GradientStop {
|
||||||
|
position: 0.0
|
||||||
|
color: led_color
|
||||||
|
}
|
||||||
|
GradientStop {
|
||||||
|
position: 0.5
|
||||||
|
color: "transparent"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ Item {
|
||||||
width: meter.width / 12
|
width: meter.width / 12
|
||||||
height: width
|
height: width
|
||||||
led_color: dev_is_ok ? led_green : led_red
|
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 {
|
Led {
|
||||||
|
@ -44,7 +44,7 @@ Item {
|
||||||
width: meter.width / 12
|
width: meter.width / 12
|
||||||
height: width
|
height: width
|
||||||
led_color: dev_is_ok ? led_green : led_red
|
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 {
|
CircleMeter {
|
||||||
|
|
Loading…
Reference in a new issue