From 1d2af268ed28dea0b35f3a0717ac044ba5d44ebd Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Wed, 18 Nov 2015 22:26:50 -0500 Subject: [PATCH] Tidying up Setup dialogs. --- .../PX4/AirframeComponent.qml | 11 ++-- src/AutoPilotPlugins/PX4/PowerComponent.qml | 59 ++++++++++++------- src/AutoPilotPlugins/PX4/SafetyComponent.qml | 4 +- src/VehicleSetup/PX4FlowSensor.qml | 2 +- src/VehicleSetup/VehicleSummary.qml | 7 +-- 5 files changed, 50 insertions(+), 33 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/AirframeComponent.qml b/src/AutoPilotPlugins/PX4/AirframeComponent.qml index bebeecd0b..55a57484c 100644 --- a/src/AutoPilotPlugins/PX4/AirframeComponent.qml +++ b/src/AutoPilotPlugins/PX4/AirframeComponent.qml @@ -76,11 +76,10 @@ QGCView { id: customConfigDialogComponent QGCViewMessage { - id: customConfigDialog - - message: "Your vehicle is using a custom airframe configuration. " + - "This configuration can only be modified through the Parameter Editor.\n\n" + - "If you want to Reset your airframe configuration and select a standard configuration, click 'Reset' above." + id: customConfigDialog + message: "Your vehicle is using a custom airframe configuration. " + + "This configuration can only be modified through the Parameter Editor.\n\n" + + "If you want to Reset your airframe configuration and select a standard configuration, click 'Reset' above." property Fact sys_autostart: controller.getParameterFact(-1, "SYS_AUTOSTART") @@ -129,7 +128,7 @@ QGCView { id: helpText width: parent.width - applyButton.width - 5 text: "Please select your airframe type. Click 'Apply and Restart' to reboot the autopilot. Please re-connect then manually." - font.pixelSize: ScreenTools.mediumFontPixelSize + font.weight: Font.DemiBold wrapMode: Text.WordWrap } diff --git a/src/AutoPilotPlugins/PX4/PowerComponent.qml b/src/AutoPilotPlugins/PX4/PowerComponent.qml index fed17d5a6..2ffd62095 100644 --- a/src/AutoPilotPlugins/PX4/PowerComponent.qml +++ b/src/AutoPilotPlugins/PX4/PowerComponent.qml @@ -119,11 +119,11 @@ QGCView { Column { id: innerColumn width: panel.width - spacing: ScreenTools.defaultFontPixelHeight + spacing: ScreenTools.defaultFontPixelHeight * 0.5 QGCLabel { text: "Battery" - font.pixelSize: ScreenTools.mediumFontPixelSize + font.weight: Font.DemiBold } Rectangle { @@ -213,20 +213,30 @@ QGCView { anchors.left: batteryImage.right anchors.verticalCenter: voltageCol.verticalCenter spacing: ScreenTools.defaultFontPixelHeight - - QGCLabel { - text: "Battery Max: " + (battNumCells.value * battHighVolt.value).toFixed(1) + ' V' + Row { + QGCLabel { + width: ScreenTools.defaultFontPixelWidth * 12 + text: "Battery Max:" + } + QGCLabel { + text: (battNumCells.value * battHighVolt.value).toFixed(1) + ' V' + } } - - QGCLabel { - text: "Battery Min: " + (battNumCells.value * battLowVolt.value).toFixed(1) + ' V' + Row { + QGCLabel { + width: ScreenTools.defaultFontPixelWidth * 12 + text: "Battery Min:" + } + QGCLabel { + text: (battNumCells.value * battLowVolt.value).toFixed(1) + ' V' + } } } } // Rectangle - Battery settings QGCLabel { text: "ESC PWM Minimum and Maximum Calibration" - font.pixelSize: ScreenTools.mediumFontPixelSize + font.weight: Font.DemiBold } Rectangle { @@ -258,15 +268,22 @@ QGCView { } } + QGCCheckBox { + id: showUAVCAN + text: "Show UAVCAN Settings" + } + QGCLabel { text: "UAVCAN Bus Configuration" - font.pixelSize: ScreenTools.mediumFontPixelSize + font.weight: Font.DemiBold + visible: showUAVCAN.checked } Rectangle { - width: parent.width - height: uavCanConfigColumn.height + ScreenTools.defaultFontPixelHeight - color: palette.windowShade + width: parent.width + height: uavCanConfigColumn.height + ScreenTools.defaultFontPixelHeight + color: palette.windowShade + visible: showUAVCAN.checked Column { id: uavCanConfigColumn @@ -288,14 +305,16 @@ QGCView { QGCLabel { text: "UAVCAN Motor Index and Direction Assignment" - font.pixelSize: ScreenTools.mediumFontPixelSize + font.weight: Font.DemiBold + visible: showUAVCAN.checked } Rectangle { - width: parent.width - height: uavCanEscCalColumn.height + ScreenTools.defaultFontPixelHeight - color: palette.windowShade - enabled: uavcanEnabledCheckBox.checked + width: parent.width + height: uavCanEscCalColumn.height + ScreenTools.defaultFontPixelHeight + color: palette.windowShade + visible: showUAVCAN.checked + enabled: uavcanEnabledCheckBox.checked Column { id: uavCanEscCalColumn @@ -326,7 +345,7 @@ QGCView { QGCButton { text: "Stop Assignment" width: ScreenTools.defaultFontPixelWidth * 20 - onClicked: controller.StopBusConfigureActuators() + onClicked: controller.stopBusConfigureActuators() } } } @@ -338,7 +357,7 @@ QGCView { QGCLabel { text: "Advanced Power Settings" - font.pixelSize: ScreenTools.mediumFontPixelSize + font.weight: Font.DemiBold visible: showAdvanced.checked } diff --git a/src/AutoPilotPlugins/PX4/SafetyComponent.qml b/src/AutoPilotPlugins/PX4/SafetyComponent.qml index 209af0be5..513ec0e35 100644 --- a/src/AutoPilotPlugins/PX4/SafetyComponent.qml +++ b/src/AutoPilotPlugins/PX4/SafetyComponent.qml @@ -65,7 +65,7 @@ QGCView { //----------------------------------------------------------------- //-- Return Home Triggers - QGCLabel { text: "Triggers For Return Home"; font.pixelSize: ScreenTools.mediumFontPixelSize; } + QGCLabel { text: "Triggers For Return Home"; font.weight: Font.DemiBold; } Item { height: ScreenTools.defaultFontPixelHeight * 0.5; width: 1 } // spacer @@ -132,7 +132,7 @@ QGCView { //----------------------------------------------------------------- //-- Return Home Settings - QGCLabel { text: "Return Home Settings"; font.pixelSize: ScreenTools.mediumFontPixelSize; } + QGCLabel { text: "Return Home Settings"; font.weight: Font.DemiBold; } Item { height: ScreenTools.defaultFontPixelHeight * 0.5; width: 1 } // spacer diff --git a/src/VehicleSetup/PX4FlowSensor.qml b/src/VehicleSetup/PX4FlowSensor.qml index 76858ba97..95805261e 100644 --- a/src/VehicleSetup/PX4FlowSensor.qml +++ b/src/VehicleSetup/PX4FlowSensor.qml @@ -49,7 +49,7 @@ QGCView { QGCLabel { id: titleLabel text: "PX4Flow Camera" - font.pixelSize: ScreenTools.mediumFontPixelSize + font.weight: Font.DemiBold } Image { diff --git a/src/VehicleSetup/VehicleSummary.qml b/src/VehicleSetup/VehicleSummary.qml index 7a0605910..ab6dbd6f9 100644 --- a/src/VehicleSetup/VehicleSummary.qml +++ b/src/VehicleSetup/VehicleSummary.qml @@ -92,11 +92,10 @@ Rectangle { width: parent.width wrapMode: Text.WordWrap color: setupComplete ? qgcPal.text : qgcPal.warningText - font.pixelSize: ScreenTools.mediumFontPixelSize + font.weight: Font.DemiBold text: setupComplete ? - "Below you will find a summary of the settings for your vehicle. To the left are the setup menus for each component." : - "WARNING: Your vehicle requires setup prior to flight. Please resolve the items marked in red using the menu on the left." - + "Below you will find a summary of the settings for your vehicle. To the left are the setup menus for each component." : + "WARNING: Your vehicle requires setup prior to flight. Please resolve the items marked in red using the menu on the left." property bool setupComplete: multiVehicleManager.activeVehicle.autopilot.setupComplete } -- 2.22.0