4import QGroundControl.Controls
6// A bold status line over a video view, on a translucent backing.
10 property alias text: label.text
11 /// Small text, for a picture-in-picture view.
12 property bool useSmallFont: true
13 /// The widest the line gets, for a view narrower than its text, which then wraps.
14 property real maximumWidth: Number.POSITIVE_INFINITY
16 width: label.width + ScreenTools.defaultFontPixelHeight
17 height: label.contentHeight + ScreenTools.defaultFontPixelHeight
18 radius: ScreenTools.defaultFontPixelWidth / 2
19 color: Qt.rgba(0, 0, 0, 0.5)
23 anchors.centerIn: parent
24 width: Math.min(implicitWidth,
25 Math.max(0, root.maximumWidth - ScreenTools.defaultFontPixelHeight))
28 font.pointSize: root.useSmallFont ? ScreenTools.smallFontPointSize : ScreenTools.largeFontPointSize
29 horizontalAlignment: Text.AlignHCenter