Browse Source

Merge pull request #7124 from DonLakeFlyer/MobileCleanup

Mobile visual cleanup
QGC4.4
Don Gagne 6 years ago committed by GitHub
parent
commit
b1c9016852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/FlightDisplay/FlightDisplayView.qml
  2. 2
      src/MissionManager/QGCMapCircle.Facts.json
  3. 49
      src/PlanView/GeoFenceEditor.qml
  4. 5
      src/PlanView/MissionItemEditor.qml
  5. 12
      src/PlanView/PlanView.qml
  6. 3
      src/PlanView/RallyPointItemEditor.qml
  7. 1
      src/PositionManager/PositionManager.cpp
  8. 90
      src/QmlControls/QGCCheckBox.qml
  9. 2
      src/QmlControls/QGCMouseArea.qml
  10. 45
      src/QmlControls/QGCRadioButton.qml
  11. 115
      src/QmlControls/ToolStrip.qml

4
src/FlightDisplay/FlightDisplayView.qml

@ -488,13 +488,13 @@ QGCView {
exclusiveGroup: multiVehicleSelectorGroup exclusiveGroup: multiVehicleSelectorGroup
text: qsTr("Single") text: qsTr("Single")
checked: true checked: true
color: mapPal.text textColor: mapPal.text
} }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: multiVehicleSelectorGroup exclusiveGroup: multiVehicleSelectorGroup
text: qsTr("Multi-Vehicle") text: qsTr("Multi-Vehicle")
color: mapPal.text textColor: mapPal.text
} }
} }

2
src/MissionManager/QGCMapCircle.Facts.json

@ -3,7 +3,7 @@
"name": "Radius", "name": "Radius",
"shortDescription": "Radius for geofence circle.", "shortDescription": "Radius for geofence circle.",
"type": "double", "type": "double",
"decimalPlaces": 2, "decimalPlaces": 1,
"min": 0.1, "min": 0.1,
"units": "m" "units": "m"
} }

49
src/PlanView/GeoFenceEditor.qml

@ -10,13 +10,9 @@ import QGroundControl.FactControls 1.0
QGCFlickable { QGCFlickable {
id: root id: root
width: availableWidth contentHeight: geoFenceEditorRect.height
height: availableHeight
contentHeight: editorColumn.height
clip: true clip: true
property real availableWidth
property real availableHeight
property var myGeoFenceController property var myGeoFenceController
property var flightMap property var flightMap
@ -24,14 +20,10 @@ QGCFlickable {
readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2
readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2 readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2
Column {
id: editorColumn
anchors.left: parent.left
anchors.right: parent.right
Rectangle { Rectangle {
id: geoFenceEditorRect id: geoFenceEditorRect
width: parent.width anchors.left: parent.left
anchors.right: parent.right
height: geoFenceItems.y + geoFenceItems.height + (_margin * 2) height: geoFenceItems.y + geoFenceItems.height + (_margin * 2)
radius: _radius radius: _radius
color: qgcPal.missionItemEditor color: qgcPal.missionItemEditor
@ -213,21 +205,10 @@ QGCFlickable {
Repeater { Repeater {
model: myGeoFenceController.polygons model: myGeoFenceController.polygons
QGCColoredImage { QGCButton {
width: ScreenTools.defaultFontPixelHeight text: qsTr("Del")
height: width
sourceSize.height: width
source: "/res/XDelete.svg"
fillMode: Image.PreserveAspectFit
color: qgcPal.text
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
onClicked: myGeoFenceController.deletePolygon(index)
property int _polygonIndex: index
QGCMouseArea {
fillItem: parent
onClicked: myGeoFenceController.deletePolygon(parent._polygonIndex)
}
} }
} }
} // GridLayout } // GridLayout
@ -314,21 +295,10 @@ QGCFlickable {
Repeater { Repeater {
model: myGeoFenceController.circles model: myGeoFenceController.circles
QGCColoredImage { QGCButton {
width: ScreenTools.defaultFontPixelHeight text: qsTr("Del")
height: width
sourceSize.height: width
source: "/res/XDelete.svg"
fillMode: Image.PreserveAspectFit
color: qgcPal.text
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
onClicked: myGeoFenceController.deleteCircle(index)
property int _circleIndex: index
QGCMouseArea {
fillItem: parent
onClicked: myGeoFenceController.deleteCircle(parent._polygonIndex)
}
} }
} }
} // GridLayout } // GridLayout
@ -336,5 +306,4 @@ QGCFlickable {
} }
} }
} // Rectangle } // Rectangle
}
} }

5
src/PlanView/MissionItemEditor.qml

@ -15,7 +15,7 @@ import QGroundControl.Palette 1.0
/// Mission item edit control /// Mission item edit control
Rectangle { Rectangle {
id: _root id: _root
height: editorLoader.y + (editorLoader.visible ? editorLoader.height : 0) + (_margin * 2) height: editorLoader.visible ? (editorLoader.y + editorLoader.height + (_margin * 2)) : (commandPicker.y + commandPicker.height + _margin / 2)
color: _currentItem ? qgcPal.missionItemEditor : qgcPal.windowShade color: _currentItem ? qgcPal.missionItemEditor : qgcPal.windowShade
radius: _radius radius: _radius
@ -90,8 +90,7 @@ Rectangle {
sourceSize.height: _hamburgerSize sourceSize.height: _hamburgerSize
source: "qrc:/qmlimages/Hamburger.svg" source: "qrc:/qmlimages/Hamburger.svg"
visible: missionItem.isCurrentItem && missionItem.sequenceNumber !== 0 visible: missionItem.isCurrentItem && missionItem.sequenceNumber !== 0
color: qgcPal.windowShade color: qgcPal.text
} }
QGCMouseArea { QGCMouseArea {

12
src/PlanView/PlanView.qml

@ -760,14 +760,6 @@ QGCView {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: ScreenTools.defaultFontPixelWidth anchors.leftMargin: ScreenTools.defaultFontPixelWidth
readonly property real _buttonRadius: ScreenTools.defaultFontPixelHeight * 0.75 readonly property real _buttonRadius: ScreenTools.defaultFontPixelHeight * 0.75
QGCColoredImage {
width: height
height: ScreenTools.defaultFontPixelWidth * 2.5
sourceSize.height: height
source: "qrc:/res/waypoint.svg"
color: qgcPal.text
anchors.verticalCenter: parent.verticalCenter
}
QGCLabel { QGCLabel {
text: qsTr("Plan") text: qsTr("Plan")
color: qgcPal.text color: qgcPal.text
@ -831,7 +823,7 @@ QGCView {
QGCListView { QGCListView {
id: missionItemEditorListView id: missionItemEditorListView
anchors.fill: parent anchors.fill: parent
spacing: ScreenTools.defaultFontPixelHeight * 0.5 spacing: ScreenTools.defaultFontPixelHeight / 4
orientation: ListView.Vertical orientation: ListView.Vertical
model: _missionController.visualItems model: _missionController.visualItems
cacheBuffer: Math.max(height * 2, 0) cacheBuffer: Math.max(height * 2, 0)
@ -865,9 +857,9 @@ QGCView {
GeoFenceEditor { GeoFenceEditor {
anchors.top: rightControls.bottom anchors.top: rightControls.bottom
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5 anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.bottom: parent.bottom
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
availableHeight: ScreenTools.availableHeight
myGeoFenceController: _geoFenceController myGeoFenceController: _geoFenceController
flightMap: editorMap flightMap: editorMap
visible: _editingLayer == _layerGeoFence visible: _editingLayer == _layerGeoFence

3
src/PlanView/RallyPointItemEditor.qml

@ -50,7 +50,7 @@ Rectangle {
color: _outerTextColor color: _outerTextColor
} }
Image { QGCColoredImage {
id: hamburger id: hamburger
anchors.rightMargin: _margin anchors.rightMargin: _margin
anchors.right: parent.right anchors.right: parent.right
@ -59,6 +59,7 @@ Rectangle {
height: width height: width
sourceSize.height: height sourceSize.height: height
source: "qrc:/qmlimages/Hamburger.svg" source: "qrc:/qmlimages/Hamburger.svg"
color: qgcPal.text
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent

1
src/PositionManager/PositionManager.cpp

@ -36,7 +36,6 @@ void QGCPositionManager::setToolbox(QGCToolbox *toolbox)
if(!_defaultSource) { if(!_defaultSource) {
//-- Otherwise, create a default one //-- Otherwise, create a default one
_defaultSource = QGeoPositionInfoSource::createDefaultSource(this); _defaultSource = QGeoPositionInfoSource::createDefaultSource(this);
qDebug() << _defaultSource;
} }
_simulatedSource = new SimulatedPosition(); _simulatedSource = new SimulatedPosition();

90
src/QmlControls/QGCCheckBox.qml

@ -6,39 +6,31 @@ import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
CheckBox { CheckBox {
activeFocusOnPress: true property color textColor: _qgcPal.text
property bool textBold: false
property real textFontPointSize: ScreenTools.defaultFontPointSize
property var _qgcPal: QGCPalette { colorGroupEnabled: enabled }
property bool _noText: text === ""
property real _radius: ScreenTools.defaultFontPixelHeight * 0.16
property var __qgcPal: QGCPalette { colorGroupEnabled: enabled } activeFocusOnPress: true
style: CheckBoxStyle { style: CheckBoxStyle {
label: Item { label: Item {
implicitWidth: text.implicitWidth + 2 implicitWidth: _noText ? 0 : text.implicitWidth + ScreenTools.defaultFontPixelWidth * 0.25
implicitHeight: ScreenTools.implicitCheckBoxHeight implicitHeight: _noText ? 0 : Math.max(text.implicitHeight, ScreenTools.checkBoxIndicatorSize)
baselineOffset: text.baselineOffset baselineOffset: text.baselineOffset
Rectangle {
anchors.margins: -1
anchors.leftMargin: -3
anchors.rightMargin: -3
anchors.fill: text
visible: control.activeFocus
height: 6
radius: 3
color: "#224f9fef"
border.color: "#47b"
opacity: 0.6
}
Text { Text {
id: text id: text
text: control.text text: control.text
antialiasing: true font.pointSize: textFontPointSize
font.pointSize: ScreenTools.defaultFontPointSize font.bold: control.textBold
font.family: ScreenTools.normalFontFamily color: control.textColor
color: control.__qgcPal.text anchors.centerIn: parent
anchors.verticalCenter: parent.verticalCenter }
} }
} // label
indicator: Item { indicator: Item {
implicitWidth: ScreenTools.checkBoxIndicatorSize implicitWidth: ScreenTools.checkBoxIndicatorSize
@ -46,56 +38,18 @@ CheckBox {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
anchors.bottomMargin: -1 radius: _radius
color: "#44ffffff" border.color: "black"
radius: baserect.radius opacity: control.checkedState === Qt.PartiallyChecked ? 0.5 : 1
}
Rectangle { Rectangle {
id: baserect anchors.margins: parent.height / 4
property var enabledGradient: Gradient {
GradientStop {color: "#eee" ; position: 0}
GradientStop {color: control.pressed ? "#eee" : "#fff" ; position: 0.1}
GradientStop {color: "#fff" ; position: 1}
}
property var disabledGradient: Gradient {
GradientStop {color: "#999" ; position: 0}
GradientStop {color: __qgcPal.textField ; position: 0.1}
GradientStop {color: __qgcPal.textField ; position: 0.9}
GradientStop {color: "#999" ; position: 1}
}
gradient: control.enabled ? enabledGradient : disabledGradient
radius: ScreenTools.defaultFontPixelHeight * 0.16
anchors.fill: parent anchors.fill: parent
border.color: control.activeFocus ? "#47b" : "#999" radius: _radius
opacity: control.enabled ? 1 : 0.5 color: "black"
visible: control.checkedState === Qt.Checked
} }
Image {
source: "/qmlimages/check.png"
opacity: control.checkedState === Qt.Checked ? control.enabled ? 1 : 0.5 : 0
anchors.centerIn: parent
anchors.verticalCenterOffset: 1
Behavior on opacity {NumberAnimation {duration: 80}}
} }
Rectangle {
anchors.fill: parent
anchors.margins: Math.round(baserect.radius)
antialiasing: true
gradient: Gradient {
GradientStop {color: control.pressed ? "#555" : "#999" ; position: 0}
GradientStop {color: "#555" ; position: 1}
} }
radius: baserect.radius - 1
anchors.centerIn: parent
anchors.alignWhenCentered: true
border.color: "#222"
Behavior on opacity {NumberAnimation {duration: 80}}
opacity: control.checkedState === Qt.PartiallyChecked ? control.enabled ? 1 : 0.5 : 0
} }
} // indicator
} // style
} }

2
src/QmlControls/QGCMouseArea.qml

@ -1,4 +1,4 @@
import QtQuick 2.3 import QtQuick 2.11
import QGroundControl 1.0 import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0

45
src/QmlControls/QGCRadioButton.qml

@ -6,41 +6,30 @@ import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
RadioButton { RadioButton {
property var color: qgcPal.text ///< Text color property color textColor: _qgcPal.text
property int textStyle: Text.Normal
property color textStyleColor: qgcPal.text
property bool textBold: false property bool textBold: false
property var qgcPal: QGCPalette { colorGroupEnabled: enabled } property real textFontPointSize: ScreenTools.defaultFontPointSize
property var _qgcPal: QGCPalette { colorGroupEnabled: enabled }
property bool _noText: text === ""
activeFocusOnPress: true
style: RadioButtonStyle { style: RadioButtonStyle {
spacing: _noText ? 0 : ScreenTools.defaultFontPixelWidth / 2
label: Item { label: Item {
implicitWidth: text.implicitWidth + ScreenTools.defaultFontPixelWidth * 0.25 implicitWidth: _noText ? 0 : text.implicitWidth + ScreenTools.defaultFontPixelWidth * 0.25
implicitHeight: ScreenTools.implicitRadioButtonHeight implicitHeight: _noText ? 0 : Math.max(text.implicitHeight, ScreenTools.radioButtonIndicatorSize)
baselineOffset: text.y + text.baselineOffset baselineOffset: text.y + text.baselineOffset
Rectangle {
anchors.fill: text
anchors.margins: -1
anchors.leftMargin: -3
anchors.rightMargin:-3
visible: control.activeFocus
height: ScreenTools.defaultFontPixelWidth * 0.25
radius: height * 0.5
color: "#224f9fef"
border.color: "#47b"
opacity: 0.6
}
Text { Text {
id: text id: text
text: control.text text: control.text
font.pointSize: ScreenTools.defaultFontPointSize font.pointSize: textFontPointSize
font.family: ScreenTools.normalFontFamily
font.bold: control.textBold font.bold: control.textBold
antialiasing: true color: control.textColor
color: control.color
style: control.textStyle
styleColor: control.textStyleColor
anchors.centerIn: parent anchors.centerIn: parent
} }
} }
@ -49,9 +38,9 @@ RadioButton {
width: ScreenTools.radioButtonIndicatorSize width: ScreenTools.radioButtonIndicatorSize
height: width height: width
color: "white" color: "white"
border.color: control.qgcPal.text border.color: "black"
antialiasing: true
radius: height / 2 radius: height / 2
opacity: control.enabled ? 1 : 0.5
Rectangle { Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
@ -60,7 +49,7 @@ RadioButton {
antialiasing: true antialiasing: true
radius: height / 2 radius: height / 2
color: "black" color: "black"
opacity: control.checked ? (control.enabled ? 1 : 0.5) : 0 visible: control.checked
} }
} }
} }

115
src/QmlControls/ToolStrip.qml

@ -7,8 +7,8 @@
* *
****************************************************************************/ ****************************************************************************/
import QtQuick 2.3 import QtQuick 2.11
import QtQuick.Controls 1.2 import QtQuick.Controls 1.4
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
@ -17,7 +17,7 @@ Rectangle {
id: _root id: _root
color: qgcPal.window color: qgcPal.window
width: ScreenTools.isMobile ? ScreenTools.minTouchPixels : ScreenTools.defaultFontPixelWidth * 7 width: ScreenTools.isMobile ? ScreenTools.minTouchPixels : ScreenTools.defaultFontPixelWidth * 7
height: buttonStripColumn.height + (buttonStripColumn.anchors.margins * 2) height: toolStripColumn.height + (toolStripColumn.anchors.margins * 2)
radius: _radius radius: _radius
border.width: 1 border.width: 1
border.color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(0,0,0,0.35) : Qt.rgba(1,1,1,0.35) border.color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(0,0,0,0.35) : Qt.rgba(1,1,1,0.35)
@ -35,9 +35,7 @@ Rectangle {
readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2 readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2
readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2
readonly property real _buttonSpacing: ScreenTools.defaultFontPixelWidth readonly property real _buttonSpacing: ScreenTools.defaultFontPixelHeight / 4
property bool _showOptionalElements: !ScreenTools.isTinyScreen
QGCPalette { id: qgcPal } QGCPalette { id: qgcPal }
ExclusiveGroup { id: dropButtonsExclusiveGroup } ExclusiveGroup { id: dropButtonsExclusiveGroup }
@ -57,51 +55,57 @@ Rectangle {
} }
Column { Column {
id: buttonStripColumn id: toolStripColumn
anchors.margins: ScreenTools.defaultFontPixelWidth / 2 anchors.margins: ScreenTools.defaultFontPixelWidth / 2
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
spacing: _buttonSpacing
QGCLabel { QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: title text: title
visible: _showOptionalElements font.pointSize: ScreenTools.smallFontPointSize
} }
Item { width: 1; height: _buttonSpacing; visible: _showOptionalElements }
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height: 1 height: 1
color: qgcPal.text color: qgcPal.text
visible: _showOptionalElements
} }
Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: _buttonSpacing
Repeater { Repeater {
id: repeater id: repeater
delegate: Column { delegate: FocusScope {
id: buttonColumn id: scope
width: buttonStripColumn.width width: toolStripColumn.width
height: buttonRect.height
visible: _root.buttonVisible ? _root.buttonVisible[index] : true visible: _root.buttonVisible ? _root.buttonVisible[index] : true
property bool checked: false property bool checked: false
property ExclusiveGroup exclusiveGroup: dropButtonsExclusiveGroup property ExclusiveGroup exclusiveGroup: dropButtonsExclusiveGroup
QGCPalette { id: _repeaterPal; colorGroupEnabled: _buttonEnabled }
property bool _buttonEnabled: _root.buttonEnabled ? _root.buttonEnabled[index] : true property bool _buttonEnabled: _root.buttonEnabled ? _root.buttonEnabled[index] : true
property var _iconSource: modelData.iconSource property var _iconSource: modelData.iconSource
property var _alternateIconSource: modelData.alternateIconSource property var _alternateIconSource: modelData.alternateIconSource
property var _source: (_root.showAlternateIcon && _root.showAlternateIcon[index]) ? _alternateIconSource : _iconSource property var _source: (_root.showAlternateIcon && _root.showAlternateIcon[index]) ? _alternateIconSource : _iconSource
property bool rotateImage: _root.rotateImage ? _root.rotateImage[index] : false property bool rotateImage: _root.rotateImage ? _root.rotateImage[index] : false
property bool animateImage: _root.animateImage ? _root.animateImage[index] : false property bool animateImage: _root.animateImage ? _root.animateImage[index] : false
property bool _hovered: false
property bool _showHighlight: checked || (_buttonEnabled && _hovered)
QGCPalette { id: _repeaterPal; colorGroupEnabled: _buttonEnabled }
onExclusiveGroupChanged: { onExclusiveGroupChanged: {
if (exclusiveGroup) { if (exclusiveGroup) {
exclusiveGroup.bindCheckable(buttonColumn) exclusiveGroup.bindCheckable(scope)
} }
} }
@ -110,7 +114,7 @@ Rectangle {
imageRotation.running = true imageRotation.running = true
} else { } else {
imageRotation.running = false imageRotation.running = false
button.rotation = 0 buttonImage.rotation = 0
} }
} }
@ -119,37 +123,35 @@ Rectangle {
opacityAnimation.running = true opacityAnimation.running = true
} else { } else {
opacityAnimation.running = false opacityAnimation.running = false
button.opacity = 1 buttonImage.opacity = 1
} }
} }
Item { Rectangle {
width: 1 id: buttonRect
height: _buttonSpacing
visible: index == 0 ? _showOptionalElements : true
}
FocusScope {
id: scope
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height: width * 0.8 height: buttonColumn.height
color: _showHighlight ? _repeaterPal.buttonHighlight : _repeaterPal.window
Rectangle { Column {
anchors.fill: parent id: buttonColumn
color: checked ? _repeaterPal.buttonHighlight : _repeaterPal.button anchors.left: parent.left
anchors.right: parent.right
spacing: -buttonImage.height / 8
QGCColoredImage { QGCColoredImage {
id: button id: buttonImage
height: parent.height anchors.left: parent.left
width: height anchors.right: parent.right
anchors.centerIn: parent height: width * 0.8
//anchors.centerIn: parent
source: _source source: _source
sourceSize.height: height sourceSize.height: height
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
mipmap: true mipmap: true
smooth: true smooth: true
color: checked ? _repeaterPal.buttonHighlightText : _repeaterPal.buttonText color: _showHighlight ? _repeaterPal.buttonHighlightText : _repeaterPal.text
RotationAnimation on rotation { RotationAnimation on rotation {
id: imageRotation id: imageRotation
@ -170,17 +172,25 @@ Rectangle {
} }
} }
QGCLabel {
id: buttonLabel
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: ScreenTools.smallFontPointSize
text: modelData.name
color: _showHighlight ? _repeaterPal.buttonHighlightText : _repeaterPal.text
enabled: _buttonEnabled
}
} // Column
QGCMouseArea { QGCMouseArea {
// Size of mouse area is expanded to make touch easier anchors.fill: parent
anchors.leftMargin: -buttonStripColumn.anchors.margins
anchors.rightMargin: -buttonStripColumn.anchors.margins
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: parent.height + (_showOptionalElements? buttonLabel.height + buttonColumn.spacing : 0)
visible: _buttonEnabled visible: _buttonEnabled
hoverEnabled: true
preventStealing: true preventStealing: true
onContainsMouseChanged: _hovered = containsMouse
onContainsPressChanged: _hovered = containsPress
onClicked: { onClicked: {
scope.focus = true scope.focus = true
if (modelData.dropPanelComponent === undefined) { if (modelData.dropPanelComponent === undefined) {
@ -205,23 +215,8 @@ Rectangle {
} }
} }
} }
} } // Rectangle
} } // FocusScope
Item {
width: 1
height: ScreenTools.defaultFontPixelHeight * 0.25
visible: _showOptionalElements
}
QGCLabel {
id: buttonLabel
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: ScreenTools.smallFontPointSize
text: modelData.name
visible: _showOptionalElements
enabled: _buttonEnabled
}
} }
} }
} }

Loading…
Cancel
Save