4import QGroundControl.Controls
6// The live telemetry overlay: the telemetry bar's values along the bottom of the picture this item is placed in,
7// wrapped where the picture is narrower. An item over the video, not part of its frames: it follows the telemetry while
8// the video is frozen or slow, and stays upright over a turned or mirrored picture.
12 property alias text: label.text
13 /// Small text, for a picture-in-picture view.
14 property bool useSmallFont: true
16 readonly property real _margin: ScreenTools.defaultFontPixelHeight / 2
17 // The picture's width less a margin on each side of the backing, and of the text in it.
18 readonly property real _maximumTextWidth: root.parent ? Math.max(0, root.parent.width - (4 * root._margin)) : 0
20 width: label.width + (2 * root._margin)
21 height: label.height + root._margin
22 radius: ScreenTools.defaultFontPixelWidth / 2
23 color: Qt.rgba(0, 0, 0, 0.5)
24 visible: root.text !== ""
27 horizontalCenter: root.parent ? root.parent.horizontalCenter : undefined
28 bottom: root.parent ? root.parent.bottom : undefined
29 bottomMargin: root._margin
34 anchors.centerIn: parent
35 width: Math.min(implicitWidth, root._maximumTextWidth)
37 font.pointSize: root.useSmallFont ? ScreenTools.smallFontPointSize : ScreenTools.mediumFontPointSize
38 horizontalAlignment: Text.AlignHCenter