Commit 9ee95420 authored by Gus Grubba's avatar Gus Grubba

Custom multi vehicle indicators/selectors

parent 33fbd552
......@@ -61,7 +61,7 @@ Button {
width: height
sourceSize.height: parent.height
fillMode: Image.PreserveAspectFit
color: qgcPal.buttonText
color: button.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText
source: "/qmlimages/PaperPlane.svg"
anchors.verticalCenter: parent.verticalCenter
}
......@@ -71,13 +71,13 @@ Button {
QGCLabel {
text: qsTr("Vehicle ") + (vehicle ? vehicle.id : qsTr("None"))
font.family: ScreenTools.demiboldFontFamily
color: qgcPal.buttonText
color: button.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText
}
Row {
spacing: ScreenTools.defaultFontPixelWidth
QGCLabel {
text: vehicle ? vehicle.flightMode : qsTr("None")
color: qgcPal.buttonText
color: button.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText
}
Rectangle {
height: ScreenTools.defaultFontPixelHeight * 0.5
......
......@@ -491,7 +491,7 @@ Item {
id: multiVehicleSelector
spacing: ScreenTools.defaultFontPixelWidth
anchors.bottom: parent.bottom
anchors.bottomMargin: ScreenTools.defaultFontPixelWidth
anchors.bottomMargin: ScreenTools.defaultFontPixelWidth * 1.5
anchors.right: parent.right
anchors.rightMargin: ScreenTools.defaultFontPixelWidth
visible: QGroundControl.multiVehicleManager.vehicles.count > 1
......@@ -501,6 +501,9 @@ Item {
property var _vehicle: QGroundControl.multiVehicleManager.vehicles.get(modelData)
vehicle: _vehicle
checked: (_vehicle && activeVehicle) ? _vehicle.id === activeVehicle.id : false
onClicked: {
QGroundControl.multiVehicleManager.activeVehicle = _vehicle
}
}
}
}
......
......@@ -281,7 +281,7 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t&
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#9d9d9d");
}
else if (colorName == QStringLiteral("buttonHighlight")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#6EF880");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#F3BC5E");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#222a35");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#edcfb4");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#e4e4e4");
......@@ -299,9 +299,9 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t&
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#585858");
}
else if (colorName == QStringLiteral("primaryButtonText")) {
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#ffffff");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#29313A");
colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupDisabled] = QColor("#777c89");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#ffffff");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupEnabled] = QColor("#29313A");
colorInfo[QGCPalette::Light][QGCPalette::ColorGroupDisabled] = QColor("#cad0d0");
}
else if (colorName == QStringLiteral("textField")) {
......
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