Unverified Commit 9445a559 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8642 from mavlink/BlankPage

Fix blank instrument values page after changing to another page
parents 07422b0d 77c29f48
...@@ -112,33 +112,32 @@ Column { ...@@ -112,33 +112,32 @@ Column {
anchors.bottom: _settingsUnlocked ? undefined : parent.bottom anchors.bottom: _settingsUnlocked ? undefined : parent.bottom
QGCLabel { QGCLabel {
width: columnRepeater.columnWidth anchors.horizontalCenter: parent.horizontalCenter
height: _columnButtonsTotalHeight height: _columnButtonsTotalHeight
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
text: _settingsUnlocked ? qsTr("BLANK") : "" text: _settingsUnlocked ? qsTr("BLANK") : ""
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
visible: !object.fact visible: !object.fact
} }
QGCLabel { QGCLabel {
id: label id: label
width: columnRepeater.columnWidth anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
text: object.label.toUpperCase() text: object.label.toUpperCase()
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
visible: object.fact && object.label visible: object.fact && object.label
} }
QGCLabel { QGCLabel {
id: value id: value
anchors.topMargin: label.visible ? 2 : 0 anchors.horizontalCenter: parent.horizontalCenter
anchors.top: label.visible ? label.bottom : parent.top anchors.topMargin: label.visible ? 2 : 0
width: columnRepeater.columnWidth anchors.top: label.visible ? label.bottom : parent.top
font.pointSize: _rgFontSizes[object.fontSize] font.pointSize: _rgFontSizes[object.fontSize]
text: visible ? (object.fact.enumOrValueString + (object.showUnits ? object.fact.units : "")) : "" text: visible ? (object.fact.enumOrValueString + (object.showUnits ? object.fact.units : "")) : ""
horizontalAlignment: Text.AlignHCenter visible: object.fact
visible: object.fact
} }
} }
} // Repeater - columns } // Repeater - columns
......
...@@ -38,7 +38,9 @@ Item { ...@@ -38,7 +38,9 @@ Item {
onFolderChanged: _updateMobileShortPath() onFolderChanged: _updateMobileShortPath()
function _updateMobileShortPath() { function _updateMobileShortPath() {
_mobileShortPath = controller.fullFolderPathToShortMobilePath(folder); if (ScreenTools.isMobile) {
_mobileShortPath = controller.fullFolderPathToShortMobilePath(folder);
}
} }
function setupFileExtensions() { function setupFileExtensions() {
......
...@@ -9,4 +9,6 @@ Text { ...@@ -9,4 +9,6 @@ Text {
font.family: ScreenTools.normalFontFamily font.family: ScreenTools.normalFontFamily
color: qgcPal.text color: qgcPal.text
antialiasing: true antialiasing: true
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
} }
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