diff --git a/src/AutoPilotPlugins/PX4/PowerComponent.qml b/src/AutoPilotPlugins/PX4/PowerComponent.qml index 1db5b8aeac07d64298a38d6fefab73c4165a0f35..ef3a6d0dd78d08449e0feceeddfbd6bcc9c0c142 100644 --- a/src/AutoPilotPlugins/PX4/PowerComponent.qml +++ b/src/AutoPilotPlugins/PX4/PowerComponent.qml @@ -248,7 +248,7 @@ QGCView { spacing: 10 QGCLabel { - color: "yellow" + color: palette.warningText text: "WARNING: Propellers must be removed from vehicle prior to performing ESC calibration." } @@ -279,7 +279,7 @@ QGCView { spacing: 10 QGCLabel { - color: "yellow" + color: palette.warningText text: "WARNING: Propellers must be removed from vehicle prior to performing UAVCAN ESC configuration." } diff --git a/src/QGCPalette.cc b/src/QGCPalette.cc index c693cd99d1f988f30613b2666fd2cfc299988bb3..12dce3af33301aac353205a44a93691f37b0af43 100644 --- a/src/QGCPalette.cc +++ b/src/QGCPalette.cc @@ -53,6 +53,11 @@ QColor QGCPalette::_text[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = { { QColor(0x58, 0x58, 0x58), QColor(0xFF, 0xFF, 0xFF) } }; +QColor QGCPalette::_warningText[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = { + { QColor(0xFF, 0xFF, 0x00), QColor(0xFF, 0xFF, 0x00) }, + { QColor(0xFF, 0xFF, 0x00), QColor(0xFF, 0xFF, 0x00) } +}; + QColor QGCPalette::_button[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = { { QColor(0x58, 0x58, 0x58), QColor(0x1b, 0x6f, 0xad) }, { QColor(0x58, 0x58, 0x58), QColor(98, 98, 100) }, diff --git a/src/QGCPalette.h b/src/QGCPalette.h index 6f703e5282e514603a2e3b9dc4d89bf116d675e2..ceaf5adda6b7273ee2454638ca8224fd3cc1e104 100644 --- a/src/QGCPalette.h +++ b/src/QGCPalette.h @@ -57,7 +57,10 @@ class QGCPalette : public QObject /// Standard text color for label text Q_PROPERTY(QColor text READ text NOTIFY paletteChanged) - /// Background color for buttons + /// Color for warning text + Q_PROPERTY(QColor warningText READ warningText NOTIFY paletteChanged) + + /// Background color for buttons Q_PROPERTY(QColor button READ button NOTIFY paletteChanged) /// Text color for buttons @@ -105,7 +108,8 @@ public: QColor windowShadeDark(void) const { return _windowShadeDark[_theme][_colorGroupEnabled ? 1 : 0]; } QColor text(void) const { return _text[_theme][_colorGroupEnabled ? 1 : 0]; } - + QColor warningText(void) const { return _warningText[_theme][_colorGroupEnabled ? 1 : 0]; } + QColor button(void) const { return _button[_theme][_colorGroupEnabled ? 1 : 0]; } QColor buttonText(void) const { return _buttonText[_theme][_colorGroupEnabled ? 1 : 0]; } QColor buttonHighlight(void) const { return _buttonHighlight[_theme][_colorGroupEnabled ? 1 : 0]; } @@ -134,7 +138,8 @@ private: static QColor _windowShade[_cThemes][_cColorGroups]; static QColor _windowShadeDark[_cThemes][_cColorGroups]; - static QColor _text[_cThemes][_cColorGroups]; + static QColor _warningText[_cThemes][_cColorGroups]; + static QColor _text[_cThemes][_cColorGroups]; static QColor _button[_cThemes][_cColorGroups]; static QColor _buttonText[_cThemes][_cColorGroups]; diff --git a/src/VehicleSetup/VehicleSummary.qml b/src/VehicleSetup/VehicleSummary.qml index 55c3d3f9158a18fae2e3be9ad46fa99fcda4ea82..89824977ee4f8b41e5f653145b339f7310422ee2 100644 --- a/src/VehicleSetup/VehicleSummary.qml +++ b/src/VehicleSetup/VehicleSummary.qml @@ -58,7 +58,7 @@ Rectangle { QGCLabel { width: parent.width wrapMode: Text.WordWrap - color: setupComplete ? qgcPal.text : "red" + color: setupComplete ? qgcPal.text : qgcPal.warningText font.pixelSize: setupComplete ? ScreenTools.defaultFontPixelSize : ScreenTools.mediumFontPixelSize text: setupComplete ? "Below you will find a summary of the settings for your vehicle. To the left are the setup menus for each component." : diff --git a/src/ui/toolbar/MainToolBar.qml b/src/ui/toolbar/MainToolBar.qml index 5b11d4f63500496c79f2c6b26842ed47819eda91..1b0211fef7da338605885edca832315ec04d7401 100644 --- a/src/ui/toolbar/MainToolBar.qml +++ b/src/ui/toolbar/MainToolBar.qml @@ -784,6 +784,7 @@ Rectangle { id: toolBarMessage anchors.fill: parent wrapMode: Text.WordWrap + color: qgcPal.warningText } QGCButton { @@ -792,6 +793,7 @@ Rectangle { anchors.topMargin: verticalMargins anchors.top: parent.top anchors.right: parent.right + primary: true text: "Close Message" onClicked: {