6import QGroundControl.Controls
10 padding: ScreenTools.defaultFontPixelWidth * 0.75
11 hoverEnabled: !ScreenTools.isMobile
15 property color textColor: checked || pressed ? qgcPal.buttonHighlightText : qgcPal.buttonText
16 property bool expandable: false
17 property bool expanded: false
23 colorGroupEnabled: control.enabled
26 background: Rectangle {
27 color: qgcPal.buttonHighlight
28 opacity: checked || pressed ? 1 : enabled && hovered ? .2 : 0
29 radius: ScreenTools.defaultFontPixelWidth / 2
32 contentItem: RowLayout {
33 spacing: ScreenTools.defaultFontPixelWidth
36 source: control.icon.source
37 color: control.icon.color
38 width: ScreenTools.defaultFontPixelHeight
39 height: ScreenTools.defaultFontPixelHeight
44 Layout.fillWidth: true
46 color: control.textColor
47 horizontalAlignment: QGCLabel.AlignLeft
51 visible: control.expandable
52 source: "/InstrumentValueIcons/cheveron-right.svg"
53 color: control.textColor
54 width: ScreenTools.defaultFontPixelHeight * 0.75
56 rotation: control.expanded ? 90 : 0
60 anchors.margins: -ScreenTools.defaultFontPixelWidth
61 onClicked: control.toggleExpand()