aboutsummaryrefslogtreecommitdiffstats
path: root/bookmarks/Bookmarks.qml
diff options
context:
space:
mode:
Diffstat (limited to 'bookmarks/Bookmarks.qml')
-rw-r--r--bookmarks/Bookmarks.qml20
1 files changed, 5 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)
}
}
}