Commit 6758047f authored by Don Gagne's avatar Don Gagne

Fix font sizing for small screens

parent 4ef84b3c
......@@ -92,7 +92,7 @@ Item {
//-- Instrument Panel
QGCInstrumentWidget {
id: instrumentGadget
anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.margins: ScreenTools.defaultFontPixelHeight / 2
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
visible: !QGroundControl.virtualTabletJoystick
......@@ -106,12 +106,12 @@ Item {
isSatellite: _isSatellite
z: QGroundControl.zOrderWidgets
qgcView: parent.parent.qgcView
maxHeight: parent.height - (ScreenTools.defaultFontPixelHeight * 2)
maxHeight: parent.height - (anchors.margins * 2)
}
QGCInstrumentWidgetAlternate {
id: instrumentGadgetAlternate
anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.margins: ScreenTools.defaultFontPixelHeight / 2
anchors.top: parent.top
anchors.right: parent.right
visible: QGroundControl.virtualTabletJoystick
......
......@@ -89,6 +89,7 @@ QGCFlickable {
width: parent.width
horizontalAlignment: Text.AlignHCenter
color: textColor
fontSizeMode: Text.HorizontalFit
text: fact.shortDescription + (fact.units ? " (" + fact.units + ")" : "")
}
QGCLabel {
......@@ -96,6 +97,7 @@ QGCFlickable {
horizontalAlignment: Text.AlignHCenter
font.pixelSize: ScreenTools.largeFontPixelSize * (largeValue ? 1.3 : 1.0)
font.weight: largeValue ? Font.ExtraBold : Font.Normal
fontSizeMode: Text.HorizontalFit
color: textColor
text: fact.valueString
}
......@@ -125,6 +127,7 @@ QGCFlickable {
width: parent.width
horizontalAlignment: Text.AlignHCenter
font.pixelSize: ScreenTools.smallFontPixelSize
fontSizeMode: Text.HorizontalFit
color: textColor
text: fact.shortDescription
}
......@@ -132,12 +135,14 @@ QGCFlickable {
width: parent.width
horizontalAlignment: Text.AlignHCenter
color: textColor
fontSizeMode: Text.HorizontalFit
text: fact.enumOrValueString
}
QGCLabel {
width: parent.width
horizontalAlignment: Text.AlignHCenter
font.pixelSize: ScreenTools.smallFontPixelSize
fontSizeMode: Text.HorizontalFit
color: textColor
text: fact.units
}
......@@ -151,17 +156,22 @@ QGCFlickable {
QGCViewDialog {
id: _propertyPickerDialog
QGCFlickable {
anchors.fill: parent
contentHeight: _loader.y + _loader.height
flickableDirection: Flickable.VerticalFlick
QGCLabel {
id: _label
text: "Select the values you want to display:"
}
Loader {
id: _loader
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: _margins
anchors.top: _label.bottom
anchors.bottom: parent.bottom
sourceComponent: factGroupList
property var factGroup: _activeVehicle
......@@ -169,6 +179,7 @@ QGCFlickable {
}
}
}
}
Component {
id: factGroupList
......
......@@ -46,7 +46,7 @@
},
{
"name": "altitudeRelative",
"shortDescription": "Altitude (home)",
"shortDescription": "Altitude-rel",
"type": "double",
"decimalPlaces": 1,
"units": "m"
......
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