5import QGroundControl.Controls
7/// File Button controls used by QGCFileDialog control
9 implicitWidth: ScreenTools.implicitButtonWidth
10 implicitHeight: ScreenTools.implicitButtonHeight
11 color: highlight ? qgcPal.buttonHighlight : qgcPal.button
12 border.color: highlight ? qgcPal.buttonHighlightText : qgcPal.buttonText
14 property alias text: label.text
15 property bool highlight: false
18 signal hamburgerClicked
20 property real _margins: ScreenTools.defaultFontPixelWidth / 2
22 QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
26 anchors.margins: _margins
27 anchors.left: parent.left
28 anchors.right: hamburger.left
29 anchors.top: parent.top
30 anchors.bottom: parent.bottom
31 verticalAlignment: Text.AlignVCenter
32 horizontalAlignment: Text.AlignHCenter
33 color: highlight ? qgcPal.buttonHighlightText : qgcPal.buttonText
34 elide: Text.ElideRight
39 anchors.rightMargin: _margins
40 anchors.right: parent.right
41 anchors.verticalCenter: parent.verticalCenter
43 height: _hamburgerSize
44 sourceSize.height: _hamburgerSize
45 source: "qrc:/qmlimages/Hamburger.svg"
46 color: highlight ? qgcPal.buttonHighlightText : qgcPal.buttonText
48 property real _hamburgerSize: parent.height * 0.75
53 onClicked: parent.clicked()
57 anchors.leftMargin: -_margins * 2
58 anchors.top: parent.top
59 anchors.bottom: parent.bottom
60 anchors.right: parent.right
61 anchors.left: hamburger.left
62 onClicked: parent.hamburgerClicked()