diff --git a/src/QmlControls/QGCComboBox.qml b/src/QmlControls/QGCComboBox.qml index d3d3d260ded2c2434bf22fbf89441315ac42b74d..a8f3555c3545579d00078a8da14b7351380ab58a 100644 --- a/src/QmlControls/QGCComboBox.qml +++ b/src/QmlControls/QGCComboBox.qml @@ -1,10 +1,40 @@ import QtQuick 2.2 import QtQuick.Controls 1.2 import QtQuick.Controls.Styles 1.2 +import QtQuick.Controls.Private 1.0 import QGroundControl.Palette 1.0 ComboBox { - property var __palette: QGCPalette { colorGroupEnabled: enabled } + property var __qgcPal: QGCPalette { colorGroupEnabled: enabled } + property bool __showHighlight: pressed | hovered + + style: ComboBoxStyle { + textColor: __showHighlight ? + control.__qgcPal.buttonHighlightText : + control.__qgcPal.buttonText + + background: Item { + implicitWidth: Math.round(TextSingleton.implicitHeight * 4.5) + implicitHeight: Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2)) + + Rectangle { + anchors.fill: parent + color: __showHighlight ? + control.__qgcPal.buttonHighlight : + control.__qgcPal.button + } + + Image { + id: imageItem + visible: control.menu !== null + source: "arrow-down.png" + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: dropDownButtonWidth / 2 + opacity: control.enabled ? 0.6 : 0.3 + } + } + } }