diff --git a/src/QmlControls/QGCComboBox.qml b/src/QmlControls/QGCComboBox.qml index 4b4d8ae9221807c716ca16aef47b78bb6010113c..0dee2f70bfb26a73f7ad23d1f89337d1ad4eb6e1 100644 --- a/src/QmlControls/QGCComboBox.qml +++ b/src/QmlControls/QGCComboBox.qml @@ -23,10 +23,14 @@ ComboBox { property bool centeredLabel: false + property var _qgcPal: QGCPalette { colorGroupEnabled: enabled } + + Component.onCompleted: indicator.color = Qt.binding(function() { return _qgcPal.text }) + background: Rectangle { implicitWidth: ScreenTools.implicitComboBoxWidth implicitHeight: ScreenTools.implicitComboBoxHeight - color: qgcPal.window + color: _qgcPal.window border.width: enabled ? 1 : 0 border.color: "#999" } @@ -38,12 +42,12 @@ ComboBox { contentItem: Text { text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData - color: control.currentIndex === index ? qgcPal.buttonHighlightText : qgcPal.buttonText + color: control.currentIndex === index ? _qgcPal.buttonHighlightText : _qgcPal.buttonText verticalAlignment: Text.AlignVCenter } background: Rectangle { - color: control.currentIndex === index ? qgcPal.buttonHighlight : qgcPal.button + color: control.currentIndex === index ? _qgcPal.buttonHighlight : _qgcPal.button } highlighted: control.highlightedIndex === index @@ -59,7 +63,7 @@ ComboBox { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: centeredLabel ? parent.horizontalCenter : undefined text: control.currentText - color: qgcPal.text + color: _qgcPal.text } } } diff --git a/src/QmlControls/QGCOptionsComboBox.qml b/src/QmlControls/QGCOptionsComboBox.qml index 6a5d6796efd3812e3391369bad30ad2c3eea4c1a..732d311ba2598b80fc3fa471c08727c18705ffb2 100644 --- a/src/QmlControls/QGCOptionsComboBox.qml +++ b/src/QmlControls/QGCOptionsComboBox.qml @@ -30,6 +30,8 @@ ComboBox { property string _flashText property bool _showFlash: false + Component.onCompleted: indicator.color = Qt.binding(function() { return _controlQGCPal.text }) + background: Rectangle { implicitWidth: ScreenTools.implicitComboBoxWidth implicitHeight: ScreenTools.implicitComboBoxHeight @@ -58,7 +60,6 @@ ComboBox { (modelData.fact.typeIsBool ? (modelData.fact.value === false ? Qt.Unchecked : Qt.Checked) : (modelData.fact.value === 0 ? Qt.Unchecked : Qt.Checked)) : modelData.checked } - contentItem: RowLayout { spacing: ScreenTools.defaultFontPixelWidth