diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-05-16 15:51:40 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-05-30 13:34:36 +0000 |
commit | eaa2b5d59cdcd899f540996520c64fad677b429e (patch) | |
tree | a6d16154fe65feb0a5a4a60cf887c3c82d3c0836 /src/imports | |
parent | f289313f109f474c90e72c20d01eb7c8c421f6d2 (diff) |
QQuickComboBox: update highlighted index on mouse hover
This is the expected behavior on desktop.
NOTE: We can no longer rely on ListView.ApplyRange, because if ListView
adjusts the content position while key navigating or scrolling, "wrong"
items may get hovered and the highlighted index gets set incorrectly
leading to a hovered->highlight->hovered loop. Therefore we force
ListView.NoHighlightRange to keep existing styles working without
modifications.
Change-Id: I57fe3de1230dd6348d01c1785cd09d4fb184d28a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/controls/ComboBox.qml | 1 | ||||
-rw-r--r-- | src/imports/controls/material/ComboBox.qml | 1 | ||||
-rw-r--r-- | src/imports/controls/universal/ComboBox.qml | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml index 162a799a..8442ec79 100644 --- a/src/imports/controls/ComboBox.qml +++ b/src/imports/controls/ComboBox.qml @@ -120,7 +120,6 @@ T.ComboBox { implicitHeight: contentHeight model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex - highlightRangeMode: ListView.ApplyRange highlightMoveDuration: 0 Rectangle { diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml index c2bdff65..55afdb3f 100644 --- a/src/imports/controls/material/ComboBox.qml +++ b/src/imports/controls/material/ComboBox.qml @@ -162,7 +162,6 @@ T.ComboBox { implicitHeight: contentHeight model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex - highlightRangeMode: ListView.ApplyRange highlightMoveDuration: 0 T.ScrollIndicator.vertical: ScrollIndicator { } diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml index 5ec5bbee..35c4d815 100644 --- a/src/imports/controls/universal/ComboBox.qml +++ b/src/imports/controls/universal/ComboBox.qml @@ -144,7 +144,6 @@ T.ComboBox { implicitHeight: contentHeight model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex - highlightRangeMode: ListView.ApplyRange highlightMoveDuration: 0 T.ScrollIndicator.vertical: ScrollIndicator { } |