From 0d7ec49de99ea5675a7522b72e0e16247081be68 Mon Sep 17 00:00:00 2001 From: Pierre TILAK Date: Thu, 11 Jul 2019 15:51:38 +1200 Subject: [PATCH] Fix Resizing issues, change setting text - Reimplement same behaviour as version 3.1 while resizing the window : Stretch the text area to fit the screen - Change setting text from Alternate Instrument Panel to Vertical Instrument Panel --- src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml | 10 +++++----- src/ui/preferences/GeneralSettings.qml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml b/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml index 142d6cea9..2fe5a260a 100644 --- a/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml +++ b/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml @@ -19,7 +19,7 @@ import QGroundControl.Palette 1.0 Rectangle { id: root - width: getPreferredInstrumentWidth() + width: getPreferredInstrumentWidth() * 0.7 height: _outerRadius * 4 + _valuesWidget.height radius: _outerRadius color: qgcPal.window @@ -27,7 +27,7 @@ Rectangle { border.color: _isSatellite ? qgcPal.mapWidgetBorderLight : qgcPal.mapWidgetBorderDark property real _innerRadius: (width - (_topBottomMargin * 2)) / 2 - property real _outerRadius: _innerRadius + _topBottomMargin + property real _outerRadius: _innerRadius + _topBottomMargin * 2 property real _defaultSize: ScreenTools.defaultFontPixelHeight * (9) property real _sizeRatio: ScreenTools.isTinyScreen ? (width / _defaultSize) * 0.5 : width / _defaultSize property real _bigFontSize: ScreenTools.defaultFontPointSize * 2.5 * _sizeRatio @@ -35,7 +35,7 @@ Rectangle { property real _labelFontSize: ScreenTools.defaultFontPointSize * 0.75 * _sizeRatio property real _spacing: ScreenTools.defaultFontPixelHeight * 0.33 property real _topBottomMargin: (width * 0.05) / 2 - property real _availableValueHeight: maxHeight - (root.height + _valuesItem.anchors.topMargin) + property real _availableValueHeight: maxHeight - (attitude.height + compass.height) // Prevent all clicks from going through to lower layers DeadMouseArea { @@ -54,10 +54,10 @@ Rectangle { anchors.horizontalCenter: parent.horizontalCenter } - Item { id: _valuesItem anchors.topMargin: ScreenTools.defaultFontPixelHeight / 4 + anchors.bottomMargin: ScreenTools.defaultFontPixelHeight / 4 anchors.top: attitude.bottom anchors.bottom: compass.top width: parent.width @@ -79,7 +79,7 @@ Rectangle { anchors.margins: 1 anchors.left: parent.left anchors.right: parent.right - maxHeight: _defaultSize + maxHeight: _availableValueHeight } } diff --git a/src/ui/preferences/GeneralSettings.qml b/src/ui/preferences/GeneralSettings.qml index 8a07958ce..08abd0d73 100644 --- a/src/ui/preferences/GeneralSettings.qml +++ b/src/ui/preferences/GeneralSettings.qml @@ -462,7 +462,7 @@ Rectangle { property Fact _virtualJoystickCentralized: QGroundControl.settingsManager.appSettings.virtualJoystickCentralized } FactCheckBox { - text: qsTr("Use Alternate Instrument Panel") + text: qsTr("Use Vertical Instrument Panel") visible: _alternateInstrumentPanel.visible fact: _alternateInstrumentPanel -- 2.22.0