Commit 0fc7356a authored by Don Gagne's avatar Don Gagne

Fix Safety layout

parent ec958ad5
...@@ -29,7 +29,7 @@ SetupPage { ...@@ -29,7 +29,7 @@ SetupPage {
Item { Item {
width: Math.max(availableWidth, outerGrid.width) width: Math.max(availableWidth, outerGrid.width)
height: outerGrid.height height: lastRect.y + lastRect.height
FactPanelController { FactPanelController {
id: controller id: controller
...@@ -38,7 +38,8 @@ SetupPage { ...@@ -38,7 +38,8 @@ SetupPage {
property real _margins: ScreenTools.defaultFontPixelHeight property real _margins: ScreenTools.defaultFontPixelHeight
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 20 property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 20
property real _imageWidth: ScreenTools.defaultFontPixelWidth * 20 property real _imageWidth: ScreenTools.defaultFontPixelWidth * 15
property real _imageHeight: ScreenTools.defaultFontPixelHeight * 3
property Fact _fenceAction: controller.getParameterFact(-1, "GF_ACTION") property Fact _fenceAction: controller.getParameterFact(-1, "GF_ACTION")
property Fact _fenceRadius: controller.getParameterFact(-1, "GF_MAX_HOR_DIST") property Fact _fenceRadius: controller.getParameterFact(-1, "GF_MAX_HOR_DIST")
...@@ -93,6 +94,7 @@ SetupPage { ...@@ -93,6 +94,7 @@ SetupPage {
} }
Rectangle { Rectangle {
id: lastRect
x: landModeGrid.x + outerGrid.x - _margins x: landModeGrid.x + outerGrid.x - _margins
y: landModeGrid.y + outerGrid.y - _margins y: landModeGrid.y + outerGrid.y - _margins
width: landModeGrid.width + (_margins * 2) width: landModeGrid.width + (_margins * 2)
...@@ -119,13 +121,14 @@ SetupPage { ...@@ -119,13 +121,14 @@ SetupPage {
columns: 3 columns: 3
Image { Image {
height: ScreenTools.defaultFontPixelWidth * 6
sourceSize.height: height
mipmap: true mipmap: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: qgcPal.globalTheme === qgcPal.Light ? "/qmlimages/LowBatteryLight.svg" : "/qmlimages/LowBattery.svg" source: qgcPal.globalTheme === qgcPal.Light ? "/qmlimages/LowBatteryLight.svg" : "/qmlimages/LowBattery.svg"
Layout.rowSpan: 3 Layout.rowSpan: 3
Layout.minimumWidth: _imageWidth Layout.maximumWidth: _imageWidth
Layout.maximumHeight: _imageHeight
width: _imageWidth
height: _imageHeight
} }
QGCLabel { QGCLabel {
...@@ -173,13 +176,14 @@ SetupPage { ...@@ -173,13 +176,14 @@ SetupPage {
columns: 3 columns: 3
Image { Image {
height: ScreenTools.defaultFontPixelWidth * 6
sourceSize.height: height
mipmap: true mipmap: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: qgcPal.globalTheme === qgcPal.Light ? "/qmlimages/RCLossLight.svg" : "/qmlimages/RCLoss.svg" source: qgcPal.globalTheme === qgcPal.Light ? "/qmlimages/RCLossLight.svg" : "/qmlimages/RCLoss.svg"
Layout.rowSpan: 3 Layout.rowSpan: 3
Layout.minimumWidth: _imageWidth Layout.maximumWidth: _imageWidth
Layout.maximumHeight: _imageHeight
width: _imageWidth
height: _imageHeight
} }
QGCLabel { QGCLabel {
...@@ -218,13 +222,14 @@ SetupPage { ...@@ -218,13 +222,14 @@ SetupPage {
columns: 3 columns: 3
Image { Image {
height: ScreenTools.defaultFontPixelWidth * 6
sourceSize.height: height
mipmap: true mipmap: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: qgcPal.globalTheme === qgcPal.Light ? "/qmlimages/DatalinkLossLight.svg" : "/qmlimages/DatalinkLoss.svg" source: qgcPal.globalTheme === qgcPal.Light ? "/qmlimages/DatalinkLossLight.svg" : "/qmlimages/DatalinkLoss.svg"
Layout.rowSpan: 3 Layout.rowSpan: 3
Layout.minimumWidth: _imageWidth Layout.maximumWidth: _imageWidth
Layout.maximumHeight: _imageHeight
width: _imageWidth
height: _imageHeight
} }
QGCLabel { QGCLabel {
...@@ -263,13 +268,14 @@ SetupPage { ...@@ -263,13 +268,14 @@ SetupPage {
columns: 3 columns: 3
Image { Image {
height: ScreenTools.defaultFontPixelWidth * 10
sourceSize.height: height
mipmap: true mipmap: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: qgcPal.globalTheme === qgcPal.Light ? "/qmlimages/GeoFenceLight.svg" : "/qmlimages/GeoFence.svg" source: qgcPal.globalTheme === qgcPal.Light ? "/qmlimages/GeoFenceLight.svg" : "/qmlimages/GeoFence.svg"
Layout.rowSpan: 3 Layout.rowSpan: 3
Layout.minimumWidth: _imageWidth Layout.maximumWidth: _imageWidth
Layout.maximumHeight: _imageHeight
width: _imageWidth
height: _imageHeight
} }
QGCLabel { QGCLabel {
...@@ -326,13 +332,14 @@ SetupPage { ...@@ -326,13 +332,14 @@ SetupPage {
QGCColoredImage { QGCColoredImage {
color: qgcPal.text color: qgcPal.text
height: ScreenTools.defaultFontPixelWidth * 10
sourceSize.height: height
mipmap: true mipmap: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: controller.vehicle.fixedWing ? "/qmlimages/ReturnToHomeAltitude.svg" : "/qmlimages/ReturnToHomeAltitudeCopter.svg" source: controller.vehicle.fixedWing ? "/qmlimages/ReturnToHomeAltitude.svg" : "/qmlimages/ReturnToHomeAltitudeCopter.svg"
Layout.rowSpan: 7 Layout.rowSpan: 7
Layout.minimumWidth: _imageWidth Layout.maximumWidth: _imageWidth
Layout.maximumHeight: _imageHeight
width: _imageWidth
height: _imageHeight
} }
QGCLabel { QGCLabel {
...@@ -420,13 +427,14 @@ SetupPage { ...@@ -420,13 +427,14 @@ SetupPage {
QGCColoredImage { QGCColoredImage {
color: qgcPal.text color: qgcPal.text
height: ScreenTools.defaultFontPixelWidth * 13
sourceSize.height: height
mipmap: true mipmap: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: controller.vehicle.fixedWing ? "/qmlimages/LandMode.svg" : "/qmlimages/LandModeCopter.svg" source: controller.vehicle.fixedWing ? "/qmlimages/LandMode.svg" : "/qmlimages/LandModeCopter.svg"
Layout.rowSpan: landVelocityLabel.visible ? 2 : 1 Layout.rowSpan: landVelocityLabel.visible ? 2 : 1
Layout.minimumWidth: _imageWidth width: _imageWidth
height: _imageHeight
Layout.maximumWidth: _imageWidth
Layout.maximumHeight: _imageHeight
} }
QGCLabel { QGCLabel {
......
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