diff --git a/src/AutoPilotPlugins/PX4/SafetyComponent.qml b/src/AutoPilotPlugins/PX4/SafetyComponent.qml index c84c492aa7d60e290549013a3d235323c00e1dc1..09f1c2576dbdd542bd59c7378fa7638b3f2d43d1 100644 --- a/src/AutoPilotPlugins/PX4/SafetyComponent.qml +++ b/src/AutoPilotPlugins/PX4/SafetyComponent.qml @@ -8,17 +8,17 @@ ****************************************************************************/ -import QtQuick 2.5 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.2 -import QtQuick.Layouts 1.2 -import QtGraphicalEffects 1.0 +import QtQuick 2.5 +import QtQuick.Controls 1.2 +import QtQuick.Controls.Styles 1.2 +import QtQuick.Layouts 1.2 +import QtGraphicalEffects 1.0 -import QGroundControl.FactSystem 1.0 -import QGroundControl.FactControls 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.ScreenTools 1.0 +import QGroundControl.FactSystem 1.0 +import QGroundControl.FactControls 1.0 +import QGroundControl.Palette 1.0 +import QGroundControl.Controls 1.0 +import QGroundControl.ScreenTools 1.0 QGCView { @@ -44,6 +44,8 @@ QGCView { property Fact _disarmLandDelay: controller.getParameterFact(-1, "COM_DISARM_LAND") property Fact _landSpeedMC: controller.getParameterFact(-1, "MPC_LAND_SPEED", false) + property bool _showIcons: !ScreenTools.isTinyScreen + QGCViewPanel { id: panel anchors.fill: parent @@ -81,8 +83,13 @@ QGCView { fillMode: Image.PreserveAspectFit source: qgcPal.globalTheme === QGCPalette.Light ? "/qmlimages/LowBatteryLight.svg" : "/qmlimages/LowBattery.svg" anchors.verticalCenter: parent.verticalCenter + visible: _showIcons + } + Item { + width: _margins * 0.5 + height: 1 + visible: _showIcons } - Item { width: _margins * 0.5; height: 1; } Column { spacing: _margins * 0.5 anchors.verticalCenter: parent.verticalCenter @@ -152,8 +159,13 @@ QGCView { fillMode: Image.PreserveAspectFit source: qgcPal.globalTheme === QGCPalette.Light ? "/qmlimages/RCLossLight.svg" : "/qmlimages/RCLoss.svg" anchors.verticalCenter: parent.verticalCenter + visible: _showIcons + } + Item { + width: _margins * 0.5 + height: 1 + visible: _showIcons } - Item { width: _margins * 0.5; height: 1; } Column { spacing: _margins * 0.5 anchors.verticalCenter: parent.verticalCenter @@ -210,8 +222,13 @@ QGCView { fillMode: Image.PreserveAspectFit source: qgcPal.globalTheme === QGCPalette.Light ? "/qmlimages/DatalinkLossLight.svg" : "/qmlimages/DatalinkLoss.svg" anchors.verticalCenter: parent.verticalCenter + visible: _showIcons + } + Item { + width: _margins * 0.5 + height: 1 + visible: _showIcons } - Item { width: _margins * 0.5; height: 1; } Column { spacing: _margins * 0.5 anchors.verticalCenter: parent.verticalCenter @@ -268,8 +285,13 @@ QGCView { fillMode: Image.PreserveAspectFit source: qgcPal.globalTheme === QGCPalette.Light ? "/qmlimages/GeoFenceLight.svg" : "/qmlimages/GeoFence.svg" anchors.verticalCenter: parent.verticalCenter + visible: _showIcons + } + Item { + width: _margins * 0.5 + height: 1 + visible: _showIcons } - Item { width: _margins * 0.5; height: 1; } Column { spacing: _margins * 0.5 anchors.verticalCenter: parent.verticalCenter @@ -352,8 +374,13 @@ QGCView { fillMode: Image.PreserveAspectFit source: controller.vehicle.fixedWing ? "/qmlimages/ReturnToHomeAltitude.svg" : "/qmlimages/ReturnToHomeAltitudeCopter.svg" anchors.verticalCenter: parent.verticalCenter + visible: _showIcons + } + Item { + width: _margins * 0.5 + height: 1 + visible: _showIcons } - Item { width: _margins * 0.5; height: 1; } Column { spacing: _margins * 0.5 Row { @@ -467,10 +494,12 @@ QGCView { fillMode: Image.PreserveAspectFit source: controller.vehicle.fixedWing ? "/qmlimages/LandMode.svg" : "/qmlimages/LandModeCopter.svg" anchors.verticalCenter: parent.verticalCenter + visible: _showIcons } Item { - width: _margins * 0.5 - height: 1 + width: _margins * 0.5 + height: 1 + visible: _showIcons } Column { spacing: _margins * 0.5