Commit 3e95a852 authored by Yasen's avatar Yasen

Custom example theme fixes - Dark theme update

This is a small experiment into creating a custom theme for QGC.
parent d7ec437d
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
custom-example
\ No newline at end of file
custom-example
\ No newline at end of file
...@@ -40,7 +40,7 @@ Button { ...@@ -40,7 +40,7 @@ Button {
width: height width: height
sourceSize.height: parent.height sourceSize.height: parent.height
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
color: (mouseArea.pressed || button.checked) ? qgcPal.colorOrange : qgcPal.buttonText color: (mouseArea.pressed || button.checked) ? qgcPal.primaryButton : qgcPal.buttonText
source: button.icon.source source: button.icon.source
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
...@@ -48,7 +48,7 @@ Button { ...@@ -48,7 +48,7 @@ Button {
id: _label id: _label
visible: text !== "" visible: text !== ""
text: button.text text: button.text
color: (mouseArea.pressed || button.checked) ? qgcPal.colorOrange : qgcPal.buttonText color: (mouseArea.pressed || button.checked) ? qgcPal.primaryButton : qgcPal.buttonText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
......
...@@ -88,7 +88,7 @@ Item { ...@@ -88,7 +88,7 @@ Item {
id: backgroundRect id: backgroundRect
width: buttonsRow.width + (ScreenTools.defaultFontPixelWidth * 4) width: buttonsRow.width + (ScreenTools.defaultFontPixelWidth * 4)
height: buttonsRow.height + (ScreenTools.defaultFontPixelHeight) height: buttonsRow.height + (ScreenTools.defaultFontPixelHeight)
color: qgcPal.windowShade color: qgcPal.window
radius: height * 0.5 radius: height * 0.5
visible: _camera && _camera.modelName === "DSC-QX30" && QGroundControl.videoManager.hasThermal visible: _camera && _camera.modelName === "DSC-QX30" && QGroundControl.videoManager.hasThermal
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
...@@ -198,7 +198,7 @@ Item { ...@@ -198,7 +198,7 @@ Item {
id: cameraRect id: cameraRect
height: cameraCol.height height: cameraCol.height
width: cameraCol.width + (ScreenTools.defaultFontPixelWidth * 4) width: cameraCol.width + (ScreenTools.defaultFontPixelWidth * 4)
color: qgcPal.windowShade color: qgcPal.window
radius: ScreenTools.defaultFontPixelWidth * 0.5 radius: ScreenTools.defaultFontPixelWidth * 0.5
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
Column { Column {
...@@ -274,7 +274,7 @@ Item { ...@@ -274,7 +274,7 @@ Item {
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
mipmap: true mipmap: true
smooth: true smooth: true
color: qgcPal.windowShade color: qgcPal.window
visible: { visible: {
if(_cameraPhotoMode && !_cameraPhotoIdle && !_cameraElapsedMode) { if(_cameraPhotoMode && !_cameraPhotoIdle && !_cameraElapsedMode) {
return true return true
...@@ -426,7 +426,7 @@ Item { ...@@ -426,7 +426,7 @@ Item {
ZoomControl { ZoomControl {
id: zoomControl id: zoomControl
visible: _hasZoom visible: _hasZoom
mainColor: qgcPal.windowShade mainColor: qgcPal.window
contentColor: qgcPal.text contentColor: qgcPal.text
fontPointSize: ScreenTools.defaultFontPointSize * 1.25 fontPointSize: ScreenTools.defaultFontPointSize * 1.25
zoomLevelVisible: false zoomLevelVisible: false
......
...@@ -251,7 +251,7 @@ Item { ...@@ -251,7 +251,7 @@ Item {
//-- Vehicle Indicator //-- Vehicle Indicator
Rectangle { Rectangle {
id: vehicleIndicator id: vehicleIndicator
color: qgcPal.windowShade color: qgcPal.window
width: vehicleStatusGrid.width + (ScreenTools.defaultFontPixelWidth * 3) width: vehicleStatusGrid.width + (ScreenTools.defaultFontPixelWidth * 3)
height: vehicleStatusGrid.height + (ScreenTools.defaultFontPixelHeight * 1.5) height: vehicleStatusGrid.height + (ScreenTools.defaultFontPixelHeight * 1.5)
radius: 2 radius: 2
...@@ -460,7 +460,7 @@ Item { ...@@ -460,7 +460,7 @@ Item {
//-- Attitude Indicator //-- Attitude Indicator
Rectangle { Rectangle {
color: qgcPal.windowShade color: qgcPal.window
width: attitudeIndicator.width * 0.5 width: attitudeIndicator.width * 0.5
height: vehicleIndicator.height height: vehicleIndicator.height
visible: _showAttitude visible: _showAttitude
......
...@@ -233,27 +233,27 @@ CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaData& ...@@ -233,27 +233,27 @@ CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaData&
const QColor CustomPlugin::_windowShadeEnabledLightColor("#FFFFFF"); const QColor CustomPlugin::_windowShadeEnabledLightColor("#FFFFFF");
const QColor CustomPlugin::_windowShadeEnabledDarkColor("#0B1420"); const QColor CustomPlugin::_windowShadeEnabledDarkColor("#212529");
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t& colorInfo) CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t& colorInfo)
{ {
if (colorName == QStringLiteral("window")) { if (colorName == QStringLiteral("window")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#0b1420"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#212529");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#0b1420"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#212529");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#ffffff"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#ffffff");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#ffffff"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#ffffff");
} }
else if (colorName == QStringLiteral("windowShade")) { else if (colorName == QStringLiteral("windowShade")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#342926"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#343A40");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#342926"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#343A40");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#d9d9d9"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#d9d9d9");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#d9d9d9"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#d9d9d9");
} }
else if (colorName == QStringLiteral("windowShadeDark")) { else if (colorName == QStringLiteral("windowShadeDark")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#40332e"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#1A1C1F");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#080f18"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#1A1C1F");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#bdbdbd"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#bdbdbd");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#bdbdbd"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#bdbdbd");
} }
...@@ -270,7 +270,7 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t& ...@@ -270,7 +270,7 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t&
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#cc0808"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#cc0808");
} }
else if (colorName == QStringLiteral("button")) { else if (colorName == QStringLiteral("button")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#594e4c"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#495057");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#313d4d"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#313d4d");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#ffffff"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#ffffff");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#ffffff"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#ffffff");
...@@ -282,26 +282,26 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t& ...@@ -282,26 +282,26 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t&
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#9d9d9d"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#9d9d9d");
} }
else if (colorName == QStringLiteral("buttonHighlight")) { else if (colorName == QStringLiteral("buttonHighlight")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#F3BC5E"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#07916D");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#222a35"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#313d4d");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#edcfb4"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#edcfb4");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#e4e4e4"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#e4e4e4");
} }
else if (colorName == QStringLiteral("buttonHighlightText")) { else if (colorName == QStringLiteral("buttonHighlightText")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#1d3c20"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#FFFFFF");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#777c89"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#777c89");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#211b1b"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#211b1b");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#2c2c2c"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#2c2c2c");
} }
else if (colorName == QStringLiteral("primaryButton")) { else if (colorName == QStringLiteral("primaryButton")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#24dc09"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#12B886");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#29313a"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#313d4d");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#8e5e54"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#8e5e54");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#585858"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#585858");
} }
else if (colorName == QStringLiteral("primaryButtonText")) { else if (colorName == QStringLiteral("primaryButtonText")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#29313A"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#FFFFFF");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#777c89"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#FFFFFF");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#29313A"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#29313A");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#cad0d0"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#cad0d0");
} }
...@@ -324,7 +324,7 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t& ...@@ -324,7 +324,7 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t&
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#585858"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#585858");
} }
else if (colorName == QStringLiteral("mapButtonHighlight")) { else if (colorName == QStringLiteral("mapButtonHighlight")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#84c448"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#07916D");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#585858"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#585858");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#be781c"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#be781c");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#585858"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#585858");
...@@ -396,8 +396,8 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t& ...@@ -396,8 +396,8 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t&
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#585858"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#585858");
} }
else if (colorName == QStringLiteral("hoverColor")) { else if (colorName == QStringLiteral("hoverColor")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#746D59"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#07916D");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#746D59"); colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#33C494");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#464f5a"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#464f5a");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#464f5a"); colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#464f5a");
} }
......
...@@ -16,7 +16,7 @@ import QGroundControl.Controls 1.0 ...@@ -16,7 +16,7 @@ import QGroundControl.Controls 1.0
Rectangle { Rectangle {
id: _root id: _root
color: qgcPal.windowShade color: qgcPal.window
width: _idealWidth < repeater.contentWidth ? repeater.contentWidth : _idealWidth width: _idealWidth < repeater.contentWidth ? repeater.contentWidth : _idealWidth
height: toolStripColumn.height + (toolStripColumn.anchors.margins * 2) height: toolStripColumn.height + (toolStripColumn.anchors.margins * 2)
radius: ScreenTools.defaultFontPixelWidth / 2 radius: ScreenTools.defaultFontPixelWidth / 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment