From 61467b2d35c9b78b352908f8236c0afea45cf635 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 29 Nov 2026 09:44:41 +0100 Subject: feat(settings): a fixed, animated distance per wheel notch Settings scrolled in jerks and a long list took dozens of notches. Two causes. The 8000/4000 velocity and deceleration pair from 474ddd0 cut each notch's flick short, so the page moved in steps rather than gliding. And under Wayland a mouse notch arrives as angleDelta 120 with pixelDelta 15, on a device Qt types as a touchpad (measured with a logged WheelEvent): Flickable trusts the pixel delta, so every notch moved 15px whatever the velocity settings said. The wallpaper list had its own handler that jumped a whole row per notch, unanimated, which read as stutter too. WheelScroll.qml replaces all of it: a MouseArea taking no buttons that turns angleDelta into a fixed step per notch and animates contentY there over 180ms, notches mid-animation extending the end point. Pages step 150px, the sidebar 120px, the wallpaper list one thumbnail row. On a page it sits beneath the content, in the MouseArea that already focused the page for the paging keys, so an inner slider or list keeps its own wheel. The velocity pair is gone. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/appearance/WallpaperTab.qml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'desktop/modules/appearance/WallpaperTab.qml') diff --git a/desktop/modules/appearance/WallpaperTab.qml b/desktop/modules/appearance/WallpaperTab.qml index cf41a4d..b51b710 100644 --- a/desktop/modules/appearance/WallpaperTab.qml +++ b/desktop/modules/appearance/WallpaperTab.qml @@ -518,18 +518,13 @@ Column { } } - // The default wheel step moves a fraction of a thumbnail; a - // notch here moves one row. A touchpad's pixel delta is kept. - MouseArea { + // A notch moves one row, animated. On top of the thumbnails, + // none of which takes the wheel. + WheelScroll { parent: wallList anchors.fill: parent - acceptedButtons: Qt.NoButton - onWheel: wheel => { - const d = wheel.pixelDelta.y !== 0 ? wheel.pixelDelta.y - : wheel.angleDelta.y / 120 * wallList.thumbHeight; - wallList.contentY = Math.max(wallList.originY, Math.min( - wallList.originY + wallList.contentHeight - wallList.height, wallList.contentY - d)); - } + flick: wallList + step: wallList.thumbHeight } } } -- cgit v1.2.3