Skip to content

Commit

Permalink
ActuatorSlider: hide (blue) indicator bar while not active
Browse files Browse the repository at this point in the history
Particularly useful for servos, so it's clear which ones are controlled.
  • Loading branch information
bkueng authored and dagar committed Dec 14, 2021
1 parent 0782a72 commit c05428b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AutoPilotPlugins/PX4/ActuatorSlider.qml
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/QmlControls/QGCSlider.qml
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit c05428b

Please sign in to comment.