From 2ca955fa57dfc135a0e8e13bc6b0b702382104d3 Mon Sep 17 00:00:00 2001 From: DoinLakeFlyer Date: Tue, 25 Feb 2020 09:30:14 -0800 Subject: [PATCH] Put back ToolStrip titles which were mysteriously removed --- src/FlightDisplay/FlightDisplayView.qml | 1 + src/PlanView/PlanView.qml | 1 + src/QmlControls/ToolStrip.qml | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml index 45a565d31..9bcbf6918 100644 --- a/src/FlightDisplay/FlightDisplayView.qml +++ b/src/FlightDisplay/FlightDisplayView.qml @@ -571,6 +571,7 @@ Item { anchors.top: parent.top z: _mapAndVideo.z + 4 maxHeight: parent.height - toolStrip.y + (_flightVideo.visible ? (_flightVideo.y - parent.height) : 0) + title: qsTr("Fly") property bool _anyActionAvailable: _guidedController.showStartMission || _guidedController.showResumeMission || _guidedController.showChangeAlt || _guidedController.showLandAbort property var _actionModel: [ diff --git a/src/PlanView/PlanView.qml b/src/PlanView/PlanView.qml index e1457162e..0d9e5eda5 100644 --- a/src/PlanView/PlanView.qml +++ b/src/PlanView/PlanView.qml @@ -570,6 +570,7 @@ Item { anchors.top: parent.top z: QGroundControl.zOrderWidgets maxHeight: parent.height - toolStrip.y + title: qsTr("Plan") //readonly property int flyButtonIndex: 0 readonly property int fileButtonIndex: 0 diff --git a/src/QmlControls/ToolStrip.qml b/src/QmlControls/ToolStrip.qml index 870620d21..87374c55e 100644 --- a/src/QmlControls/ToolStrip.qml +++ b/src/QmlControls/ToolStrip.qml @@ -24,6 +24,7 @@ Rectangle { property alias model: repeater.model property real maxHeight ///< Maximum height for control, determines whether text is hidden to make control shorter + property alias title: titleLabel.text property AbstractButton lastClickedButton: null @@ -71,6 +72,15 @@ Rectangle { anchors.right: parent.right spacing: ScreenTools.defaultFontPixelWidth * 0.25 + QGCLabel { + id: titleLabel + anchors.left: parent.left + anchors.right: parent.right + horizontalAlignment: Text.AlignHCenter + font.pointSize: ScreenTools.smallFontPointSize + visible: title != "" + } + Repeater { id: repeater -- 2.22.0