From c31991e83a2aac4010df90d33495616c5b060f2f Mon Sep 17 00:00:00 2001 From: Yasen Date: Tue, 30 Jul 2019 11:48:41 +0200 Subject: [PATCH] Mutli-vehicle layout fix * Move the Multi-vehicle UI next, not under, the indicators * Remove the icon --- .../res/Custom/Widgets/CustomVehicleButton.qml | 22 +++++++++++----------- custom-example/res/CustomFlyView.qml | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/custom-example/res/Custom/Widgets/CustomVehicleButton.qml b/custom-example/res/Custom/Widgets/CustomVehicleButton.qml index 698d1be..91a5c21 100644 --- a/custom-example/res/Custom/Widgets/CustomVehicleButton.qml +++ b/custom-example/res/Custom/Widgets/CustomVehicleButton.qml @@ -47,7 +47,7 @@ Button { background: Rectangle { anchors.fill: parent - color: button.checked ? qgcPal.buttonHighlight : qgcPal.button + color: button.checked ? qgcPal.window : qgcPal.button radius: ScreenTools.defaultFontPixelWidth * 0.5 } @@ -55,16 +55,16 @@ Button { spacing: ScreenTools.defaultFontPixelWidth anchors.margins: ScreenTools.defaultFontPixelWidth anchors.verticalCenter: button.verticalCenter - QGCColoredImage { - id: _icon - height: ScreenTools.defaultFontPixelHeight * 1.5 - width: height - sourceSize.height: parent.height - fillMode: Image.PreserveAspectFit - color: button.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText - source: "/qmlimages/PaperPlane.svg" - anchors.verticalCenter: parent.verticalCenter - } +// QGCColoredImage { +// id: _icon +// height: ScreenTools.defaultFontPixelHeight * 1.5 +// width: height +// sourceSize.height: parent.height +// fillMode: Image.PreserveAspectFit +// color: button.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText +// source: "/qmlimages/PaperPlane.svg" +// anchors.verticalCenter: parent.verticalCenter +// } Column { id: _infoCol spacing: ScreenTools.defaultFontPixelHeight * 0.25 diff --git a/custom-example/res/CustomFlyView.qml b/custom-example/res/CustomFlyView.qml index 940f841..a54140a 100644 --- a/custom-example/res/CustomFlyView.qml +++ b/custom-example/res/CustomFlyView.qml @@ -256,7 +256,7 @@ Item { width: vehicleStatusGrid.width + (ScreenTools.defaultFontPixelWidth * 3) height: vehicleStatusGrid.height + (ScreenTools.defaultFontPixelHeight * 1.5) radius: 2 - anchors.bottom: multiVehicleSelector.visible ? multiVehicleSelector.top : parent.bottom + anchors.bottom: parent.bottom anchors.bottomMargin: ScreenTools.defaultFontPixelWidth anchors.right: attitudeIndicator.visible ? attitudeIndicator.left : parent.right anchors.rightMargin: attitudeIndicator.visible ? -ScreenTools.defaultFontPixelWidth : ScreenTools.defaultFontPixelWidth @@ -493,7 +493,7 @@ Item { spacing: ScreenTools.defaultFontPixelWidth anchors.bottom: parent.bottom anchors.bottomMargin: ScreenTools.defaultFontPixelWidth * 1.5 - anchors.right: parent.right + anchors.right: vehicleIndicator.left anchors.rightMargin: ScreenTools.defaultFontPixelWidth visible: QGroundControl.multiVehicleManager.vehicles.count > 1 Repeater {