Commit accb2ed3 authored by Valentin Platzgummer's avatar Valentin Platzgummer

wima menu scrollbar fixed

parent 99d9796c
./create_linux_appimage.sh /home/valentin/drones/qgroundcontrol/ /home/valentin/drones/build-qgroundcontrol-Desktop_Qt_5_11_3_GCC_64bit-Release/release/ ./create_linux_appimage.sh /home/valentin/Desktop/drones/qgroundcontrol/ /home/valentin/Desktop/drones/build-qgroundcontrol-Desktop_Qt_5_11_3_GCC_64bit-Release/release/
...@@ -62,10 +62,6 @@ Item { ...@@ -62,10 +62,6 @@ Item {
width: enableWima.enableWimaBoolean ? parent.width : enableWima.width width: enableWima.enableWimaBoolean ? parent.width : enableWima.width
color: enableWima.enableWimaBoolean ? qgcPal.window : "transparent" color: enableWima.enableWimaBoolean ? qgcPal.window : "transparent"
radius: ScreenTools.defaultFontPixelHeight / 4 radius: ScreenTools.defaultFontPixelHeight / 4
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.bottomMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.rightMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.leftMargin: ScreenTools.defaultFontPixelHeight * 0.5
// checkbox to enable/ disable wima // checkbox to enable/ disable wima
SliderSwitch { SliderSwitch {
...@@ -87,47 +83,64 @@ Item { ...@@ -87,47 +83,64 @@ Item {
} }
} }
Rectangle { Item {
id: controllerFrame id: flickableWrapper
anchors.top: enableWima.bottom anchors.top: enableWima.bottom
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.margins: ScreenTools.defaultFontPixelHeight *0.25 anchors.margins: ScreenTools.defaultFontPixelHeight*0.5
color: qgcPal.window
QGCFlickable {
clip: true clip: true
anchors.fill: parent
contentHeight: wrapperItem.height
contentWidth: wrapperItem.width
Item {
id: wrapperItem
width: Math.max(flickableWrapper.width, mainColumn.width)
height: mainColumn.height
ScrollView { property int itemWidth: 120
id: scrollView
anchors.fill: parent
Column { Column {
/*SectionHeader { id: mainColumn
anchors.horizontalCenter: parent.horizontalCenter
spacing: 4
SectionHeader{
id: settingsHeader id: settingsHeader
text: qsTr("Settings") text: qsTr("Settings")
}*/ }
GridLayout { GridLayout {
columns: 2 columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5 columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5
visible: settingsHeader.checked visible: settingsHeader.checked
// Settings QGCLabel {
QGCLabel { text: qsTr("Next Waypoint") } text: qsTr("Next Waypoint")
Layout.fillWidth: true
}
FactTextField { FactTextField {
fact: wimaController.startWaypointIndex fact: wimaController.startWaypointIndex
Layout.fillWidth: true Layout.fillWidth: true
} }
QGCLabel { text: qsTr("Max Waypoints") } QGCLabel {
text: qsTr("Max Waypoints")
Layout.fillWidth: true
}
FactTextField { FactTextField {
fact: wimaController.maxWaypointsPerPhase fact: wimaController.maxWaypointsPerPhase
Layout.fillWidth: true Layout.fillWidth: true
} }
QGCLabel { text: qsTr("Overlap") } QGCLabel {
text: qsTr("Overlap")
Layout.fillWidth: true
}
FactTextField { FactTextField {
fact: wimaController.overlapWaypoints fact: wimaController.overlapWaypoints
Layout.fillWidth: true Layout.fillWidth: true
...@@ -136,49 +149,66 @@ Item { ...@@ -136,49 +149,66 @@ Item {
FactCheckBox { FactCheckBox {
text: qsTr("Show All") text: qsTr("Show All")
fact: wimaController.showAllMissionItems fact: wimaController.showAllMissionItems
Layout.fillWidth: true
} }
FactCheckBox { FactCheckBox {
text: qsTr("Show Current") text: qsTr("Show Current")
fact: wimaController.showCurrentMissionItems fact: wimaController.showCurrentMissionItems
Layout.fillWidth: true
} }
} // Grid
} SectionHeader{
/*SectionHeader{
id: missionHeader id: missionHeader
text: qsTr("Mission") text: qsTr("Mission")
}*/ }
GridLayout { GridLayout {
columns: 2 columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5 columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5
visible: missionHeader.checked visible: missionHeader.checked
width: parent.width
QGCLabel { text: qsTr("Speed") } QGCLabel {
text: qsTr("Speed")
Layout.fillWidth: true
}
FactTextField { FactTextField {
fact: wimaController.flightSpeed fact: wimaController.flightSpeed
Layout.fillWidth: true Layout.fillWidth: true
} }
QGCLabel { text: qsTr("Altitude") } QGCLabel {
text: qsTr("Altitude")
Layout.fillWidth: true
}
FactTextField { FactTextField {
fact: wimaController.altitude fact: wimaController.altitude
Layout.fillWidth: true Layout.fillWidth: true
} }
}
GridLayout {
columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5
visible: missionHeader.checked
width: parent.width
// Buttons // Buttons
QGCButton { QGCButton {
id: buttonPreviousMissionPhase id: buttonPreviousMissionPhase
text: qsTr("Reverse") text: qsTr("Reverse")
onClicked: wimaController.previousPhase(); onClicked: wimaController.previousPhase()
Layout.fillWidth: true Layout.fillWidth: true
} }
QGCButton { QGCButton {
id: buttonNextMissionPhase id: buttonNextMissionPhase
text: qsTr("Forward") text: qsTr("Forward")
onClicked: wimaController.nextPhase(); onClicked: wimaController.nextPhase()
Layout.fillWidth: true Layout.fillWidth: true
} }
...@@ -186,12 +216,10 @@ Item { ...@@ -186,12 +216,10 @@ Item {
id: buttonResetPhase id: buttonResetPhase
text: qsTr("Reset Phase") text: qsTr("Reset Phase")
onClicked: wimaController.resetPhase(); onClicked: wimaController.resetPhase();
Layout.columnSpan: 2
Layout.fillWidth: true Layout.fillWidth: true
Layout.rowSpan: 2
} }
} // Grid
/*}
SectionHeader{ SectionHeader{
id: vehicleHeader id: vehicleHeader
...@@ -201,19 +229,20 @@ Item { ...@@ -201,19 +229,20 @@ Item {
columns: 2 columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5 columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5
visible: vehicleHeader.checked*/ visible: vehicleHeader.checked
width: parent.width
QGCButton { QGCButton {
id: buttonUpload id: buttonUpload
text: qsTr("Upload") text: qsTr("Upload")
onClicked: wimaController.uploadToVehicle(); onClicked: wimaController.uploadToVehicle()
Layout.fillWidth: true Layout.fillWidth: true
} }
QGCButton { QGCButton {
id: buttonRemoveFromVehicle id: buttonRemoveFromVehicle
text: qsTr("Remove") text: qsTr("Remove")
onClicked: wimaController.removeFromVehicle(); onClicked: wimaController.removeFromVehicle()
Layout.fillWidth: true Layout.fillWidth: true
} }
...@@ -221,10 +250,9 @@ Item { ...@@ -221,10 +250,9 @@ Item {
id: buttonSmartRTL id: buttonSmartRTL
text: qsTr("Smart RTL") text: qsTr("Smart RTL")
onClicked: initSmartRTL() onClicked: initSmartRTL()
Layout.columnSpan: 2
Layout.fillWidth: true Layout.fillWidth: true
} }
// placeholder, remove if you add stuff
QGCLabel { text: "" }
// progess bar // progess bar
...@@ -234,6 +262,8 @@ Item { ...@@ -234,6 +262,8 @@ Item {
width: _controllerProgressPct * parent.width width: _controllerProgressPct * parent.width
color: qgcPal.colorGreen color: qgcPal.colorGreen
visible: false visible: false
Layout.columnSpan: 2
Layout.fillWidth: true
} }
QGCLabel { QGCLabel {
...@@ -244,44 +274,49 @@ Item { ...@@ -244,44 +274,49 @@ Item {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
text: "Done" text: "Done"
visible: false visible: false
Layout.fillWidth: true
} }
} }
/*SectionHeader { SectionHeader {
id: statsHeader id: statsHeader
text: qsTr("Statistics") text: qsTr("Statistics")
}*/ }
GridLayout { GridLayout {
columns: 2 columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.25 anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
visible: statsHeader.checked visible: statsHeader.checked
QGCLabel { QGCLabel {
text: qsTr("Phase Length: ") text: qsTr("Phase Length: ")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize Layout.fillWidth: true
} }
QGCLabel { QGCLabel {
text: wimaController.phaseDistance >= 0 ? wimaController.phaseDistance.toFixed(2) + " m": "" text: wimaController.phaseDistance >= 0 ? wimaController.phaseDistance.toFixed(2) + " m": ""
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize Layout.fillWidth: true
} }
QGCLabel { QGCLabel {
text: qsTr("Phase Duration: ") text: qsTr("Phase Duration: ")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize Layout.fillWidth: true
} }
QGCLabel { QGCLabel {
text: wimaController.phaseDuration >= 0 ? getTime(wimaController.phaseDuration) : "" text: wimaController.phaseDuration >= 0 ? getTime(wimaController.phaseDuration) : ""
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize Layout.fillWidth: true
}
QGCLabel {
text: ""
Layout.columnSpan: 2
} }
} }
} // mainColumn } // settingsColumn
} // item } // wrapperItem
} // Rectangle } // QGCFlickable
} // Item
} }
} }
...@@ -8,8 +8,7 @@ import QGroundControl.Palette 1.0 ...@@ -8,8 +8,7 @@ import QGroundControl.Palette 1.0
FocusScope { FocusScope {
id: _root id: _root
anchors.left: parent.left width: parent.width
anchors.right: parent.right
height: column.height height: column.height
property alias text: label.text property alias text: label.text
......
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