6import QGroundControl.Controls
10 padding: ScreenTools.defaultFontPixelWidth * 0.75
11 hoverEnabled: !ScreenTools.isMobile
15 property color textColor: qgcPal.textPrimary
16 property bool expandable: false
17 property bool expanded: false
23 colorGroupEnabled: control.enabled
26 background: Rectangle {
27 color: checked || pressed ? qgcPal.accentSubtle : (enabled && hovered ? qgcPal.windowCard : "transparent")
28 border.width: checked || pressed ? 1 : 0
29 border.color: qgcPal.accent
30 radius: ScreenTools.defaultFontPixelWidth / 2
33 contentItem: RowLayout {
34 spacing: ScreenTools.defaultFontPixelWidth
37 source: control.icon.source
38 color: control.icon.color
39 width: ScreenTools.defaultFontPixelHeight
40 height: ScreenTools.defaultFontPixelHeight
45 Layout.fillWidth: true
47 color: control.textColor
48 horizontalAlignment: QGCLabel.AlignLeft
52 visible: control.expandable
53 source: "/InstrumentValueIcons/cheveron-right.svg"
54 color: control.textColor
55 width: ScreenTools.defaultFontPixelHeight * 0.75
57 rotation: control.expanded ? 90 : 0
61 anchors.margins: -ScreenTools.defaultFontPixelWidth
62 onClicked: control.toggleExpand()