This commit is contained in:
ItsLemmy
2025-11-30 14:36:23 -05:00
parent 5d3c91f3ad
commit b6c1f6e90a
2 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -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;
}