4import QGroundControl.Controls
9 color: _flickable.indicatorColor
11 visible: showIndicator
12 state: orientation == QGCFlickableScrollIndicator.Vertical ? "vertical" : "horizontal"
14 property bool showIndicator: false
15 property int orientation: QGCFlickableScrollIndicator.Vertical
22 property real _opacity: 0.5
23 property var _flickable: parent
30 anchors.right: _flickable.right
35 y: _flickable.height * (_flickable.contentY / _flickable.contentHeight)
36 width: ScreenTools.defaultFontPixelWidth / 2
37 height: _flickable.height * (_flickable.height / _flickable.contentHeight)
38 showIndicator: (_flickable.flickableDirection === Flickable.AutoFlickDirection ||
39 _flickable.flickableDirection === Flickable.VerticalFlick ||
40 _flickable.flickableDirection === Flickable.HorizontalAndVerticalFlick) &&
41 (_flickable.contentHeight > _flickable.height)
49 anchors.bottom: _flickable.bottom
54 x: _flickable.width * (_flickable.contentX / _flickable.contentWidth)
55 height: ScreenTools.defaultFontPixelWidth / 2
56 width: _flickable.width * (_flickable.width / _flickable.contentWidth)
57 showIndicator: (_flickable.flickableDirection === Flickable.AutoFlickDirection ||
58 _flickable.flickableDirection === Flickable.HorizontalFlick ||
59 _flickable.flickableDirection === Flickable.HorizontalAndVerticalFlick) &&
60 (_flickable.contentWidth > _flickable.width)
65 Component.onCompleted: { if (animateOpacity) animateOpacity.restart() }
66 onVisibleChanged: { if (animateOpacity) animateOpacity.restart() }
67 onHeightChanged: { if (animateOpacity) animateOpacity.restart() }
68 onWidthChanged: { if (animateOpacity) animateOpacity.restart() }
71 target: control._flickable
72 function onMovementStarted() { control.opacity = control._opacity }
73 function onMovementEnded() { animateOpacity.restart() }
74 function onContentHeightChanged() { animateOpacity.restart() }
81 from: control._opacity
84 easing.type: Easing.InQuint