Browse Source

ActuatorSlider: hide (blue) indicator bar while not active

Particularly useful for servos, so it's clear which ones are controlled.
QGC4.4
Beat Küng 3 years ago committed by Daniel Agar
parent
commit
c05428b273
  1. 3
      src/AutoPilotPlugins/PX4/ActuatorSlider.qml
  2. 2
      src/QmlControls/QGCSlider.qml

3
src/AutoPilotPlugins/PX4/ActuatorSlider.qml

@ -43,7 +43,8 @@ Column { @@ -43,7 +43,8 @@ Column {
value: defaultVal
updateValueWhileDragging: true
anchors.horizontalCenter: parent.horizontalCenter
height: ScreenTools.defaultFontPixelHeight * _sliderHeight
height: ScreenTools.defaultFontPixelHeight * _sliderHeight
indicatorBarVisible: sendTimer.running
onValueChanged: {
if (blockUpdates)

2
src/QmlControls/QGCSlider.qml

@ -22,6 +22,7 @@ Slider { @@ -22,6 +22,7 @@ Slider {
// Value indicator starts display from zero instead of min value
property bool zeroCentered: false
property bool displayValue: false
property bool indicatorBarVisible: true
style: SliderStyle {
groove: Item {
@ -40,6 +41,7 @@ Slider { @@ -40,6 +41,7 @@ Slider {
Item {
id: indicatorBar
clip: true
visible: indicatorBarVisible
x: _root.zeroCentered ? zeroCenteredIndicatorStart : 0
width: _root.zeroCentered ? centerIndicatorWidth : styleData.handlePosition
height: parent.height

Loading…
Cancel
Save