From 8c7432cbed484cf406a14ffabb0ff0ab2506888d Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sun, 31 Jul 2016 14:45:10 -0700 Subject: [PATCH] Fix reversed colors --- src/QGCMapPalette.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/QGCMapPalette.h b/src/QGCMapPalette.h index 6e0e88f1f..4c19361ea 100644 --- a/src/QGCMapPalette.h +++ b/src/QGCMapPalette.h @@ -28,7 +28,7 @@ class QGCMapPalette : public QObject // text - Text color // thumbJoystick - Thumb joystick indicator - Q_PROPERTY(QColor text READ text NOTIFY paletteChanged) + Q_PROPERTY(QColor text READ text NOTIFY paletteChanged) Q_PROPERTY(QColor thumbJoystick READ thumbJoystick NOTIFY paletteChanged) public: @@ -37,11 +37,12 @@ public: bool lightColors(void) const { return _lightColors; } void setLightColors(bool lightColors); - QColor text(void) const { return _text[_lightColors]; } - QColor thumbJoystick(void) const { return _thumbJoystick[_lightColors]; } + QColor text(void) const { return _text[_lightColors ? 0 : 1]; } + QColor thumbJoystick(void) const { return _thumbJoystick[_lightColors ? 0 : 1]; } signals: void paletteChanged(void); + void lightColorsChanged(bool lightColors); private: bool _lightColors; -- 2.22.0