Browse Source

Merge pull request #3501 from DonLakeFlyer/FlightModeSmallScreen

Flight Mode: Flow sections to available real estate
QGC4.4
Don Gagne 9 years ago
parent
commit
e0b483ffdc
  1. 30
      src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
  2. 4
      src/FlightDisplay/FlightDisplayViewWidgets.qml

30
src/AutoPilotPlugins/APM/APMFlightModesComponent.qml

@ -44,8 +44,16 @@ QGCView {
QGCFlickable { QGCFlickable {
anchors.fill: parent anchors.fill: parent
clip: true clip: true
flickableDirection: Flickable.VerticalFlick contentHeight: flowLayout.height
contentHeight: flightModeSettings.y + flightModeSettings.height contentWidth: flowLayout.width
Flow {
id: flowLayout
width: panel.width // parent.width doesn't work here for some reason!
spacing: _margins
Column {
spacing: _margins
QGCLabel { QGCLabel {
id: flightModeLabel id: flightModeLabel
@ -55,8 +63,6 @@ QGCView {
Rectangle { Rectangle {
id: flightModeSettings id: flightModeSettings
anchors.topMargin: _margins
anchors.top: flightModeLabel.bottom
width: flightModeColumn.width + (_margins * 2) width: flightModeColumn.width + (_margins * 2)
height: flightModeColumn.height + ScreenTools.defaultFontPixelHeight height: flightModeColumn.height + ScreenTools.defaultFontPixelHeight
color: qgcPal.windowShade color: qgcPal.windowShade
@ -99,7 +105,6 @@ QGCView {
property int index: modelData + 1 property int index: modelData + 1
property var pwmStrings: [ "PWM 0 - 1230", "PWM 1231 - 1360", "PWM 1361 - 1490", "PWM 1491 - 1620", "PWM 1621 - 1749", "PWM 1750 +"] property var pwmStrings: [ "PWM 0 - 1230", "PWM 1231 - 1360", "PWM 1361 - 1490", "PWM 1491 - 1620", "PWM 1621 - 1749", "PWM 1750 +"]
QGCLabel { QGCLabel {
anchors.baseline: modeCombo.baseline anchors.baseline: modeCombo.baseline
text: qsTr("Flight Mode ") + index + ":" text: qsTr("Flight Mode ") + index + ":"
@ -121,26 +126,23 @@ QGCView {
} // Repeater - Flight Modes } // Repeater - Flight Modes
} // Column - Flight Modes } // Column - Flight Modes
} // Rectangle - Flight Modes } // Rectangle - Flight Modes
} // Column - Flight Modes
Column {
spacing: _margins
visible: _channelOptionCount != 0
QGCLabel { QGCLabel {
id: channelOptionsLabel id: channelOptionsLabel
anchors.leftMargin: _margins
anchors.top: parent.top
anchors.left: flightModeSettings.right
text: qsTr("Channel Options") text: qsTr("Channel Options")
font.family: ScreenTools.demiboldFontFamily font.family: ScreenTools.demiboldFontFamily
visible: _channelOptionCount != 0
} }
Rectangle { Rectangle {
id: channelOptionsSettings id: channelOptionsSettings
anchors.topMargin: _margins
anchors.top: channelOptionsLabel.bottom
anchors.left: channelOptionsLabel.left
width: channelOptColumn.width + (_margins * 2) width: channelOptColumn.width + (_margins * 2)
height: channelOptColumn.height + ScreenTools.defaultFontPixelHeight height: channelOptColumn.height + ScreenTools.defaultFontPixelHeight
color: qgcPal.windowShade color: qgcPal.windowShade
visible: _channelOptionCount != 0
Column { Column {
id: channelOptColumn id: channelOptColumn
@ -174,6 +176,8 @@ QGCView {
} // Repeater -- Channel options } // Repeater -- Channel options
} // Column - Channel options } // Column - Channel options
} // Rectangle - Channel options } // Rectangle - Channel options
} // Column - Channel options
} // Flow
} // QGCFlickable } // QGCFlickable
} // QGCViewPanel } // QGCViewPanel
} // QGCView } // QGCView

4
src/FlightDisplay/FlightDisplayViewWidgets.qml

@ -238,7 +238,7 @@ Item {
//-- Zoom Map In //-- Zoom Map In
RoundButton { RoundButton {
id: mapZoomPlus id: mapZoomPlus
visible: _mainIsMap visible: !ScreenTools.isTinyScreen && _mainIsMap
buttonImage: "/qmlimages/ZoomPlus.svg" buttonImage: "/qmlimages/ZoomPlus.svg"
exclusiveGroup: _dropButtonsExclusiveGroup exclusiveGroup: _dropButtonsExclusiveGroup
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
@ -253,7 +253,7 @@ Item {
//-- Zoom Map Out //-- Zoom Map Out
RoundButton { RoundButton {
id: mapZoomMinus id: mapZoomMinus
visible: _mainIsMap visible: !ScreenTools.isTinyScreen && _mainIsMap
buttonImage: "/qmlimages/ZoomMinus.svg" buttonImage: "/qmlimages/ZoomMinus.svg"
exclusiveGroup: _dropButtonsExclusiveGroup exclusiveGroup: _dropButtonsExclusiveGroup
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets

Loading…
Cancel
Save