diff --git a/qgcresources.qrc b/qgcresources.qrc index c3b12d2b28cf3587838cc39d76439c6a51802c44..eb7ff201f253065d23771ca6e83ca8d987180729 100644 --- a/qgcresources.qrc +++ b/qgcresources.qrc @@ -147,12 +147,14 @@ resources/Pause.svg resources/Play.svg resources/PowerButton.svg + resources/QGCLogoWhite.png + resources/QGCLogoBlack.png resources/QGroundControlConnect.svg resources/SplashScreen.png resources/Stop.svg resources/XDelete.svg resources/XDeleteBlack.svg - + resources/firmware/px4.png resources/firmware/apm.png diff --git a/resources/QGCLogoBlack.png b/resources/QGCLogoBlack.png new file mode 100644 index 0000000000000000000000000000000000000000..31e792eeaadbfed832094c91580891bb814b4473 Binary files /dev/null and b/resources/QGCLogoBlack.png differ diff --git a/resources/QGCLogoWhite.png b/resources/QGCLogoWhite.png new file mode 100644 index 0000000000000000000000000000000000000000..cb52e4ef5822d782ecd629e9e40bf2b38e2a901e Binary files /dev/null and b/resources/QGCLogoWhite.png differ diff --git a/src/QGCPalette.cc b/src/QGCPalette.cc index 6372e8183558354878e56c31505099589158659c..d55f1fcc6236c2c07a70e7ac8c644171ee8fa42b 100644 --- a/src/QGCPalette.cc +++ b/src/QGCPalette.cc @@ -119,6 +119,16 @@ QColor QGCPalette::_mapWidgetBorderDark[QGCPalette::_cThemes][QGCPalette::_cColo { QColor(0, 0, 0), QColor(0, 0, 0) }, }; +QColor QGCPalette::_brandingPurple[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = { + { QColor("#4A2C6D"), QColor("#4A2C6D") }, + { QColor("#4A2C6D"), QColor("#4A2C6D") }, +}; + +QColor QGCPalette::_brandingBlue[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = { + { QColor("#48D6FF"), QColor("#48D6FF") }, + { QColor("#48D6FF"), QColor("#48D6FF") }, +}; + QGCPalette::QGCPalette(QObject* parent) : QObject(parent), _colorGroupEnabled(true) diff --git a/src/QGCPalette.h b/src/QGCPalette.h index 2b105aaca94cd4a2255811d86ddc321b265b6e5e..a58f34265fe9a5ada8dce26420a25decde6e93b8 100644 --- a/src/QGCPalette.h +++ b/src/QGCPalette.h @@ -64,6 +64,10 @@ class QGCPalette : public QObject // textFieldText - Text color for TextFields // mapButton - Background color for map buttons // mapButtonHighlight - Background color for map button in selected or hover state + // mapWidgetBorderLight - Widget border color which will stand out against light map tiles + // mapWidgetBorderDark - Widget border color which will stand out against dark map tiles + // brandingPurple - Purple color from branding guidelines + // brandingBlue - Blue color from branding guidelines Q_PROPERTY(QColor window READ window WRITE setWindow NOTIFY paletteChanged) Q_PROPERTY(QColor windowShade READ windowShade WRITE setWindowShade NOTIFY paletteChanged) @@ -82,6 +86,8 @@ class QGCPalette : public QObject Q_PROPERTY(QColor mapButtonHighlight READ mapButtonHighlight WRITE setMapButtonHighlight NOTIFY paletteChanged) Q_PROPERTY(QColor mapWidgetBorderLight READ mapWidgetBorderLight WRITE setMapWidgetBorderLight NOTIFY paletteChanged) Q_PROPERTY(QColor mapWidgetBorderDark READ mapWidgetBorderDark WRITE setMapWidgetBorderDark NOTIFY paletteChanged) + Q_PROPERTY(QColor brandingPurple READ brandingPurple NOTIFY paletteChanged) + Q_PROPERTY(QColor brandingBlue READ brandingBlue NOTIFY paletteChanged) public: enum ColorGroup { @@ -117,6 +123,8 @@ public: QColor mapButtonHighlight(void) const { return _mapButtonHighlight[_theme][_colorGroupEnabled ? 1 : 0]; } QColor mapWidgetBorderLight(void) const { return _mapWidgetBorderLight[_theme][_colorGroupEnabled ? 1 : 0]; } QColor mapWidgetBorderDark(void) const { return _mapWidgetBorderDark[_theme][_colorGroupEnabled ? 1 : 0]; } + QColor brandingPurple(void) const { return _brandingPurple[_theme][_colorGroupEnabled ? 1 : 0]; } + QColor brandingBlue(void) const { return _brandingBlue[_theme][_colorGroupEnabled ? 1 : 0]; } void setWindow(QColor& color) { _window[_theme][_colorGroupEnabled ? 1 : 0] = color; _signalPaletteChangeToAll(); } void setWindowShade(QColor& color) { _windowShade[_theme][_colorGroupEnabled ? 1 : 0] = color; _signalPaletteChangeToAll(); } @@ -174,10 +182,12 @@ private: static QColor _mapButton[_cThemes][_cColorGroups]; static QColor _mapButtonHighlight[_cThemes][_cColorGroups]; - static QColor _mapWidgetBorderLight[_cThemes][_cColorGroups]; static QColor _mapWidgetBorderDark[_cThemes][_cColorGroups]; + static QColor _brandingPurple[_cThemes][_cColorGroups]; + static QColor _brandingBlue[_cThemes][_cColorGroups]; + void _themeChanged(void); static QList _paletteObjects; ///< List of all active QGCPalette objects diff --git a/src/ui/toolbar/MainToolBar.qml b/src/ui/toolbar/MainToolBar.qml index be07f6c769d616ab22e3b220023f772492e3a521..316bd99cb078e15caa8f88e63084dc5daa0c5d25 100644 --- a/src/ui/toolbar/MainToolBar.qml +++ b/src/ui/toolbar/MainToolBar.qml @@ -419,15 +419,22 @@ Rectangle { ExclusiveGroup { id: mainActionGroup } - QGCToolBarButton { - id: preferencesButton - width: mainWindow.tbButtonWidth - anchors.top: parent.top - anchors.bottom: parent.bottom - source: "/qmlimages/Hamburger.svg" - onClicked: { - mainWindow.showLeftMenu(); - preferencesButton.checked = false; + Image { + id: preferencesButton + width: mainWindow.tbButtonWidth + anchors.topMargin: _topBottomMargins + anchors.bottomMargin: _topBottomMargins + anchors.top: parent.top + anchors.bottom: parent.bottom + source: qgcPal.globalTheme == QGCPalette.Light ? "/res/QGCLogoBlack" : "/res/QGCLogoWhite" + fillMode: Image.PreserveAspectFit + + readonly property real _topBottomMargins: ScreenTools.defaultFontPixelHeight / 2 + + MouseArea { + anchors.fill: parent + + onClicked: mainWindow.showLeftMenu() } }