aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/universal/ComboBox.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-11-13 16:11:48 +0100
committerMitch Curtis <mitch.curtis@qt.io>2018-12-12 14:33:38 +0000
commitb943bbf91162ba8aad4a6c3b0c7ca2e944a26105 (patch)
treeeac29be705c1ebb3e8eb941bd172af0a98fdc599 /src/imports/controls/universal/ComboBox.qml
parent021c6064addd168017e0e9eff17639669e2f85d1 (diff)
Make it visually clear which ComboBox item is the current item
Do as the Default style does and make the current item bold. If we don't do this, it can be impossible to distinguish the current item from the highlighted item, especially when the popup obscures the button. Change-Id: If40b9c73c207d07fb5669564cdcfcea29ebed2f1 Fixes: QTBUG-68794 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/imports/controls/universal/ComboBox.qml')
-rw-r--r--src/imports/controls/universal/ComboBox.qml1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml
index 2b650682..3ec7e98b 100644
--- a/src/imports/controls/universal/ComboBox.qml
+++ b/src/imports/controls/universal/ComboBox.qml
@@ -58,6 +58,7 @@ T.ComboBox {
delegate: ItemDelegate {
width: parent.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
+ font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
highlighted: control.highlightedIndex === index
hoverEnabled: control.hoverEnabled
}