diff --git a/Widgets/NComboBox.qml b/Widgets/NComboBox.qml index b3e3bbf4..c3930af1 100644 --- a/Widgets/NComboBox.qml +++ b/Widgets/NComboBox.qml @@ -120,7 +120,7 @@ RowLayout { width: ListView.view ? ListView.view.width : (parentComboBox ? parentComboBox.width - Style.marginM * 3 : 0) hoverEnabled: true highlighted: ListView.view.currentIndex === itemIndex - + property bool pendingClick: false Timer { id: clickRetryTimer diff --git a/Widgets/NListView.qml b/Widgets/NListView.qml index 729fbd88..a430a64e 100644 --- a/Widgets/NListView.qml +++ b/Widgets/NListView.qml @@ -112,37 +112,37 @@ Item { ListView { id: listView anchors.fill: parent - + anchors.rightMargin: root.verticalScrollBarActive ? root.handleWidth + 4 : 0 clip: true boundsBehavior: Flickable.StopAtBounds flickDeceleration: 1500 - + Timer { id: scrollbarActiveTimer interval: 150 repeat: false } - + WheelHandler { id: wheelHandler target: listView acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad - - onWheel: function(event) { + + onWheel: function (event) { if (listView.flicking || listView.moving) { listView.cancelFlick(); } - + var delta = event.pixelDelta.y !== 0 ? event.pixelDelta.y : (event.angleDelta.y / 8); var newContentY = listView.contentY - delta; newContentY = Math.max(0, Math.min(newContentY, listView.contentHeight - listView.height)); listView.contentY = newContentY; - + if (listView.ScrollBar.vertical) { listView.ScrollBar.vertical.active = true; } - + scrollbarActiveTimer.restart(); event.accepted = true; }