QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VehicleSummaryLabel.qml
Go to the documentation of this file.
1import QtQuick
2
3import QGroundControl
4import QGroundControl.Controls
5
6/// Label that lines up with a neighbouring icon or dot when vertically centered. The text box has more room above
7/// the capital letters than below the baseline, which would otherwise leave the text low.
8QGCLabel {
9 id: control
10 // Distance the capital letters sit below the middle of the text box; the padding lifts them by half of it
11 bottomPadding: Math.max(0, 2 * (baselineOffset + capitals.tightBoundingRect.y + capitals.tightBoundingRect.height / 2 - contentHeight / 2))
12
13 TextMetrics {
14 id: capitals
15 font: control.font
16 text: "H"
17 }
18}