diff options
Diffstat (limited to 'bookmarks')
| -rw-r--r-- | bookmarks/Bookmarks.qml | 20 | ||||
| l--------- | bookmarks/WheelScroll.qml | 1 |
2 files changed, 6 insertions, 15 deletions
diff --git a/bookmarks/Bookmarks.qml b/bookmarks/Bookmarks.qml index edb1ac5..8ca4099 100644 --- a/bookmarks/Bookmarks.qml +++ b/bookmarks/Bookmarks.qml @@ -576,22 +576,12 @@ Scope { } } - // Flickable's own wheel step is a few pixels a notch - // and dragged on 500 bookmarks. This scrolls 3 rows of - // cards a notch instead; buttons pass through to the - // cards. A MouseArea, as WheelHandler never fired in - // the island. - MouseArea { + // Three rows of cards a notch, animated (WheelScroll.qml); + // buttons pass through to the cards. + WheelScroll { anchors.fill: grid - acceptedButtons: Qt.NoButton - onWheel: wheel => { - const step = wheel.pixelDelta.y !== 0 ? wheel.pixelDelta.y * 2 - : wheel.angleDelta.y / 120 * 3 * (72 + grid.gap); - const top = grid.originY - grid.topMargin; - const bottom = Math.max(top, grid.originY + grid.contentHeight - + grid.bottomMargin - grid.height); - grid.contentY = Math.max(top, Math.min(bottom, grid.contentY - step)); - } + flick: grid + step: 3 * (72 + grid.gap) } } } diff --git a/bookmarks/WheelScroll.qml b/bookmarks/WheelScroll.qml new file mode 120000 index 0000000..f6de73f --- /dev/null +++ b/bookmarks/WheelScroll.qml @@ -0,0 +1 @@ +../shared/WheelScroll.qml
\ No newline at end of file |
