From 67f676d91308fab354230ffc3b8e156d865ddd3d Mon Sep 17 00:00:00 2001 From: Belal Date: Mon, 1 Sep 2025 11:15:33 +0300 Subject: dashboard/media: add scroll to seek (#528) * dashboard/media: add scroll to seek * fix --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> --- modules/dashboard/Media.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'modules/dashboard') diff --git a/modules/dashboard/Media.qml b/modules/dashboard/Media.qml index d2699a2..9c6ef16 100644 --- a/modules/dashboard/Media.qml +++ b/modules/dashboard/Media.qml @@ -289,6 +289,23 @@ Item { if (active?.canSeek && active?.positionSupported) active.position = value * active.length; } + + CustomMouseArea { + anchors.fill: parent + acceptedButtons: Qt.NoButton + + function onWheel(event: WheelEvent) { + const active = Players.active; + if (!active?.canSeek || !active?.positionSupported) + return; + + event.accepted = true; + const delta = event.angleDelta.y > 0 ? 10 : -10; // Time 10 seconds + Qt.callLater(() => { + active.position = Math.max(0, Math.min(active.length, active.position + delta)); + }); + } + } } Item { -- cgit v1.2.3-freya