aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorMassimo Callegari <massimocallegari@yahoo.it>2018-12-28 15:02:43 +0100
committerMitch Curtis <mitch.curtis@qt.io>2019-01-24 10:04:20 +0000
commit28454b503c7e77a85855e1cc5911908d46d29366 (patch)
tree3cf20c63df91bca462ca8cc30244d4a05a769e56 /src/imports
parent196dcb8d095cc2b5ace5a55bc3c8a1055267c070 (diff)
ComboBox: propagate palette colors to popup
This allows a quick alternative to redefining the whole popup item by just acting on palette colors. Fixes: QTBUG-72786 Change-Id: I19e5158e2ad18fa9bf512f02d4bbe74cb06aba35 Reviewed-by: Massimo Callegari <massimocallegari@yahoo.it> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/controls/ComboBox.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index 6b7fe008..69156114 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -55,6 +55,7 @@ T.ComboBox {
delegate: ItemDelegate {
width: parent.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
+ palette.text: control.highlightedIndex === index ? control.palette.highlightedText : control.palette.text
font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
highlighted: control.highlightedIndex === index
hoverEnabled: control.hoverEnabled
@@ -132,6 +133,8 @@ T.ComboBox {
T.ScrollIndicator.vertical: ScrollIndicator { }
}
- background: Rectangle { }
+ background: Rectangle {
+ color: control.palette.window
+ }
}
}