From 8867b5411ed46dab9d4d1f01a97a9ad83d62c141 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sat, 22 Aug 2015 20:52:26 -0700 Subject: [PATCH] Add new warningText palette entry --- src/QGCPalette.cc | 5 +++++ src/QGCPalette.h | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/QGCPalette.cc b/src/QGCPalette.cc index c693cd99d..12dce3af3 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 6f703e528..ceaf5adda 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]; -- 2.22.0