5import QGroundControl.Controls
9 font.family: ScreenTools.normalFontFamily
10 font.pointSize: ScreenTools.defaultFontPointSize
12 property color textColor: qgcPal.text
13 property bool _noText: text === ""
15 QGCPalette { id:qgcPal; colorGroupEnabled: enabled }
17 indicator: Rectangle {
18 implicitWidth: ScreenTools.radioButtonIndicatorSize
20 color: control.enabled ? "white" : "transparent"
21 border.color: qgcPal.buttonBorder
23 x: control.leftPadding
24 y: parent.height / 2 - height / 2
28 color: qgcPal.buttonHighlight
29 opacity: control.hovered ? .2 : 0
34 anchors.centerIn: parent
35 // Width should be an odd number to be centralized by the parent properly
36 width: 2 * Math.floor(parent.width / 4) + 1
40 color: qgcPal.buttonHighlight
41 visible: control.checked
47 font.family: control.font.pointSize
48 font.pointSize: control.font.pointSize
49 font.bold: control.font.bold
50 color: control.textColor
51 verticalAlignment: Text.AlignVCenter
52 leftPadding: control.indicator.width + (_noText ? 0 : ScreenTools.defaultFontPixelWidth * 0.25)