Commit de31d93e authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4642 from DonLakeFlyer/ControlSizing

Control sizing on mobile
parents fea29a4a 2dbd8519
...@@ -53,10 +53,7 @@ Rectangle { ...@@ -53,10 +53,7 @@ Rectangle {
anchors.top: parent.top anchors.top: parent.top
spacing: _margin spacing: _margin
QGCLabel { QGCLabel { text: qsTr("Planned Home Position") }
text: qsTr("Planned Home Position")
color: qgcPal.buttonHighlight
}
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
...@@ -96,7 +93,6 @@ Rectangle { ...@@ -96,7 +93,6 @@ Rectangle {
QGCLabel { QGCLabel {
text: qsTr("Vehicle Info") text: qsTr("Vehicle Info")
color: qgcPal.buttonHighlight
visible: _multipleFirmware visible: _multipleFirmware
} }
......
...@@ -286,7 +286,7 @@ Rectangle { ...@@ -286,7 +286,7 @@ Rectangle {
} }
} }
QGCLabel { text: qsTr("Camera"); color: qgcPal.buttonHighlight; visible: gridTypeCombo.currentIndex !== _gridTypeManual} QGCLabel { text: qsTr("Camera"); visible: gridTypeCombo.currentIndex !== _gridTypeManual}
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
...@@ -420,7 +420,7 @@ Rectangle { ...@@ -420,7 +420,7 @@ Rectangle {
} }
} }
QGCLabel { text: qsTr("Grid"); color: qgcPal.buttonHighlight;} QGCLabel { text: qsTr("Grid") }
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
...@@ -523,7 +523,7 @@ Rectangle { ...@@ -523,7 +523,7 @@ Rectangle {
spacing: _margin spacing: _margin
visible: gridTypeCombo.currentIndex == _gridTypeManual visible: gridTypeCombo.currentIndex == _gridTypeManual
QGCLabel { text: qsTr("Grid"); color: qgcPal.buttonHighlight;} QGCLabel { text: qsTr("Grid") }
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
...@@ -547,7 +547,7 @@ Rectangle { ...@@ -547,7 +547,7 @@ Rectangle {
onClicked: missionItem.gridAltitudeRelative = checked onClicked: missionItem.gridAltitudeRelative = checked
} }
QGCLabel { text: qsTr("Camera"); color: qgcPal.buttonHighlight;} QGCLabel { text: qsTr("Camera") }
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
...@@ -578,7 +578,7 @@ Rectangle { ...@@ -578,7 +578,7 @@ Rectangle {
} }
} }
QGCLabel { text: qsTr("Polygon"); color: qgcPal.buttonHighlight;} QGCLabel { text: qsTr("Polygon") }
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
...@@ -621,7 +621,7 @@ Rectangle { ...@@ -621,7 +621,7 @@ Rectangle {
} }
} }
QGCLabel { text: qsTr("Statistics"); color: qgcPal.buttonHighlight;} QGCLabel { text: qsTr("Statistics") }
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
......
...@@ -19,7 +19,7 @@ ComboBox { ...@@ -19,7 +19,7 @@ ComboBox {
background: Item { background: Item {
implicitWidth: Math.round(ScreenTools.defaultFontPixelWidth * 4.5) implicitWidth: Math.round(ScreenTools.defaultFontPixelWidth * 4.5)
implicitHeight: ScreenTools.isMobile ? Math.max(25, Math.round(ScreenTools.defaultFontPixelHeight * 2)) : Math.max(25, Math.round(ScreenTools.defaultFontPixelHeight * 1.2)) implicitHeight: Math.round(ScreenTools.defaultFontPixelHeight * (ScreenTools.isMobile ? 2 : 1.2))
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
......
...@@ -26,7 +26,8 @@ TextField { ...@@ -26,7 +26,8 @@ TextField {
QGCPalette { id: qgcPal; colorGroupEnabled: enabled } QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
textColor: qgcPal.textFieldText textColor: qgcPal.textFieldText
height: Math.round(Math.max(25, ScreenTools.defaultFontPixelHeight * (ScreenTools.isMobile ? 2.5 : 1.2)))
implicitHeight: Math.round(ScreenTools.defaultFontPixelHeight * (ScreenTools.isMobile ? 2 : 1.2))
QGCLabel { QGCLabel {
id: unitsLabelWidthGenerator id: unitsLabelWidthGenerator
......
...@@ -48,12 +48,13 @@ Rectangle { ...@@ -48,12 +48,13 @@ Rectangle {
} }
MouseArea { MouseArea {
x: -_root.x x: -_root.x
y: -_root.y y: -_root.y
width: _root.parent.width width: _root.parent.width
height: _root.parent.height height: _root.parent.height
visible: dropPanel.visible visible: dropPanel.visible
onClicked: dropPanel.hide() onClicked: dropPanel.hide()
preventStealing: true
} }
Column { Column {
...@@ -144,11 +145,15 @@ Rectangle { ...@@ -144,11 +145,15 @@ Rectangle {
} }
MouseArea { MouseArea {
anchors.left: parent.left // Size of mouse area is expanded to make touch easier
anchors.right: parent.right anchors.leftMargin: buttonStripColumn.margins
anchors.top: parent.top anchors.rightMargin: buttonStripColumn.margins
height: parent.height + (_showOptionalElements? buttonLabel.height + buttonColumn.spacing : 0) anchors.left: parent.left
visible: _root.buttonEnabled ? _root.buttonEnabled[index] : true anchors.right: parent.right
anchors.top: parent.top
height: parent.height + (_showOptionalElements? buttonLabel.height + buttonColumn.spacing : 0)
visible: _root.buttonEnabled ? _root.buttonEnabled[index] : true
preventStealing: true
onClicked: { onClicked: {
if (modelData.dropPanelComponent === undefined) { if (modelData.dropPanelComponent === undefined) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment