Commit 811ab74e authored by Don Gagne's avatar Don Gagne

Small screen fixes

parent c99edca4
......@@ -49,6 +49,7 @@ QGCView {
property Fact _armingCheck: controller.getParameterFact(-1, "ARMING_CHECK")
property real _margins: ScreenTools.defaultFontPixelHeight
property bool _showIcon: !ScreenTools.isTinyScreen
ExclusiveGroup { id: fenceActionRadioGroup }
ExclusiveGroup { id: landLoiterRadioGroup }
......@@ -61,8 +62,16 @@ QGCView {
QGCFlickable {
clip: true
anchors.fill: parent
contentHeight: armingCheckSettings.y + armingCheckSettings.height
contentWidth: armingCheckSettings.x + armingCheckSettings.width
contentHeight: flowLayout.height
contentWidth: flowLayout.width
Flow {
id: flowLayout
width: panel.width // parent.width doesn't work for some reason
spacing: _margins
Column {
spacing: _margins / 2
QGCLabel {
id: failsafeLabel
......@@ -72,10 +81,6 @@ QGCView {
Rectangle {
id: failsafeSettings
anchors.topMargin: _margins / 2
anchors.rightMargin: _margins
anchors.left: parent.left
anchors.top: failsafeLabel.bottom
width: throttleEnableCombo.x + throttleEnableCombo.width + _margins
height: mahField.y + mahField.height + _margins
color: palette.windowShade
......@@ -197,23 +202,21 @@ QGCView {
showUnits: true
}
} // Rectangle - Failsafe Settings
} // Column - Failsafe Settings
Column {
spacing: _margins / 2
QGCLabel {
id: geoFenceLabel
anchors.leftMargin: _margins
anchors.left: failsafeSettings.right
anchors.top: parent.top
text: qsTr("GeoFence")
font.family: ScreenTools.demiboldFontFamily
}
Rectangle {
id: geoFenceSettings
anchors.topMargin: _margins / 2
anchors.left: geoFenceLabel.left
anchors.top: geoFenceLabel.bottom
anchors.bottom: failsafeSettings.bottom
width: fenceAltMaxField.x + fenceAltMaxField.width + _margins
height: fenceAltMaxField.y + fenceAltMaxField.height + _margins
color: palette.windowShade
QGCCheckBox {
......@@ -323,20 +326,19 @@ QGCView {
showUnits: true
}
} // Rectangle - GeoFence Settings
} // Column - GeoFence Settings
Column {
spacing: _margins / 2
QGCLabel {
id: rtlLabel
anchors.topMargin: _margins
anchors.top: geoFenceSettings.bottom
text: qsTr("Return to Launch")
font.family: ScreenTools.demiboldFontFamily
}
Rectangle {
id: rtlSettings
anchors.topMargin: _margins / 2
anchors.left: parent.left
anchors.top: rtlLabel.bottom
width: rltAltFinalField.x + rltAltFinalField.width + _margins
height: rltAltFinalField.y + rltAltFinalField.height + _margins
color: palette.windowShade
......@@ -359,13 +361,14 @@ QGCView {
anchors.fill: icon
source: icon
color: palette.text
visible: _showIcon
}
QGCRadioButton {
id: returnAtCurrentRadio
anchors.leftMargin: _margins
anchors.left: icon.right
anchors.top: icon.top
anchors.margins: _margins
anchors.left: _showIcon ? icon.right : parent.left
anchors.top: parent.top
text: qsTr("Return at current altitude")
checked: _rtlAltFact.value == 0
exclusiveGroup: returnAltRadioGroup
......@@ -456,33 +459,47 @@ QGCView {
showUnits: true
}
} // Rectangle - RTL Settings
} // Column - RTL Settings
Column {
spacing: _margins / 2
QGCLabel {
id: armingCheckLabel
anchors.topMargin: _margins
anchors.left: parent.left
anchors.top: rtlSettings.bottom
text: qsTr("Arming Checks")
font.family: ScreenTools.demiboldFontFamily
}
Rectangle {
id: armingCheckSettings
anchors.topMargin: _margins / 2
anchors.left: parent.left
anchors.top: armingCheckLabel.bottom
width: armingCheckColumn.x + armingCheckColumn.width + _margins
height: armingCheckColumn.y + armingCheckColumn.height + _margins
width: flowLayout.width
height: armingCheckInnerColumn.height + (_margins * 2)
color: palette.windowShade
Column {
id: armingCheckColumn
id: armingCheckInnerColumn
anchors.margins: _margins
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
spacing: _margins
QGCLabel { text: qsTr("Be very careful when turning off arming checks. Could lead to loss of Vehicle control.") }
FactBitmask { fact: _armingCheck }
QGCLabel {
id: armingCheckWarning
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
text: qsTr("Turning off arming checks can lead to loss of Vehicle control.")
}
FactBitmask {
id: armingCheckBitmask
anchors.left: parent.left
anchors.right: parent.right
fact: _armingCheck
}
}
} // Rectangle - Arming checks
} // Column - Arming Checks
} // Flow
} // QGCFlickable
} // QGCViewPanel
} // QGCView
......@@ -46,21 +46,23 @@ QGCView {
QGCFlickable {
clip: true
anchors.fill: parent
contentHeight: rtlSettings.y + rtlSettings.height
flickableDirection: Flickable.VerticalFlick
contentWidth: flowLayout.width
contentHeight: flowLayout.height
Flow {
id: flowLayout
width: panel.width // parent.width doesn't work for some reason
spacing: _margins
Column {
spacing: _margins / 2
QGCLabel {
id: failsafeTriggersLabel
text: qsTr("Failsafe Triggers")
font.family: ScreenTools.demiboldFontFamily
}
Rectangle {
id: failsafeTriggerSettings
anchors.topMargin: _margins / 2
anchors.rightMargin: _margins
anchors.left: parent.left
anchors.top: failsafeTriggersLabel.bottom
width: throttlePWMField.x + throttlePWMField.width + _margins
height: gcsCheckbox.y + gcsCheckbox.height + _margins
color: palette.windowShade
......@@ -139,22 +141,19 @@ QGCView {
onClicked: _failsafeGCSEnable.value = checked ? 1 : 0
}
} // Rectangle - Failsafe trigger settings
} // Column - Failsafe trigger settings
Column {
spacing: _margins / 2
QGCLabel {
id: rtlLabel
anchors.leftMargin: _margins
anchors.left: failsafeTriggerSettings.right
text: qsTr("Return to Launch")
font.family: ScreenTools.demiboldFontFamily
}
Rectangle {
id: rtlSettings
anchors.topMargin: _margins / 2
anchors.left: rtlLabel.left
anchors.top: rtlLabel.bottom
anchors.bottom: failsafeTriggerSettings.bottom
width: rltAltField.x + rltAltField.width + _margins
height: rltAltField.y + rltAltField.height + _margins
color: palette.windowShade
QGCRadioButton {
......@@ -191,6 +190,8 @@ QGCView {
enabled: returnAltRadio.checked
}
} // Rectangle - RTL Settings
} // Column - RTL Settings
} // Flow
} // QGCFlickable
} // QGCViewPanel
} // QGCView
......@@ -6,7 +6,7 @@ import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
Row {
Flow {
spacing: ScreenTools.defaultFontPixelWidth
property Fact fact: Fact { }
......
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