Commit 8663920e authored by DonLakeFlyer's avatar DonLakeFlyer

Better visual layout

parent 2db30a14
......@@ -82,47 +82,43 @@ Rectangle {
GridLayout {
anchors.left: parent.left
anchors.right: parent.right
flow: GridLayout.TopToBottom
rows: missionItem.textFieldFacts.count + missionItem.nanFacts.count + (missionItem.speedSection.available ? 1 : 0)
columns: 2
Repeater {
model: missionItem.textFieldFacts
QGCLabel {
QGCLabel { text: object.name }
}
Repeater {
model: missionItem.nanFacts
QGCCheckBox {
text: object.name
Layout.column: 0
Layout.row: index
checked: !isNaN(object.rawValue)
onClicked: object.rawValue = checked ? 0 : NaN
}
}
QGCCheckBox {
id: flightSpeedCheckbox
text: qsTr("Flight Speed")
checked: missionItem.speedSection.specifyFlightSpeed
onClicked: missionItem.speedSection.specifyFlightSpeed = checked
visible: missionItem.speedSection.available
}
Repeater {
model: missionItem.textFieldFacts
FactTextField {
showUnits: true
fact: object
Layout.column: 1
Layout.row: index
Layout.fillWidth: true
}
}
}
GridLayout {
anchors.left: parent.left
anchors.right: parent.right
columns: 2
Repeater {
model: missionItem.nanFacts
QGCCheckBox {
text: object.name
Layout.column: 0
Layout.row: index
checked: !isNaN(object.rawValue)
onClicked: object.rawValue = checked ? 0 : NaN
}
}
Repeater {
model: missionItem.nanFacts
......@@ -130,31 +126,16 @@ Rectangle {
FactTextField {
showUnits: true
fact: object
Layout.column: 1
Layout.row: index
Layout.fillWidth: true
enabled: !isNaN(object.rawValue)
}
}
}
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
spacing: ScreenTools.defaultFontPixelWidth
visible: missionItem.speedSection.available
QGCCheckBox {
id: flightSpeedCheckbox
text: qsTr("Flight Speed")
checked: missionItem.speedSection.specifyFlightSpeed
onClicked: missionItem.speedSection.specifyFlightSpeed = checked
}
FactTextField {
fact: missionItem.speedSection.flightSpeed
Layout.fillWidth: true
enabled: flightSpeedCheckbox.checked
visible: missionItem.speedSection.available
}
}
......
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