Bug 443616

Summary: Implement gesture support to zoom on touchscreen or touchpad laptop
Product: [Applications] digikam Reporter: Mike Morrison <mike>
Component: Preview-ImageAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: alegriseta, caulier.gilles, nicojunk
Priority: NOR    
Version First Reported In: 7.4.0   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 9.0.0
Sentry Crash Report:
Attachments: Plasma 5 from Kubuntu 24.04 LTS trackpad support.

Description Mike Morrison 2021-10-11 23:47:01 UTC
Pinch-to-zoom touchscreen gestures are currently supported in Google Chrome browser and in TiddlyDesktop. I would love it if digiKam supported such gestures when previewing a photo.

Ubuntu 21.04
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Comment 1 caulier.gilles 2021-10-12 08:10:40 UTC
Qt has Gesture support since a long time. This must be introduced in preview/canvas model view events.

https://doc.qt.io/qt-5/gestures-overview.html
Comment 2 Nick_FR 2025-11-26 10:07:52 UTC
I support this request! Pinch to zoom is sorely lacking in Digikam: it's so much faster when you have a trackpad... Please give it some thought :)
Comment 3 Alessandro Griseta 2025-12-19 09:13:00 UTC
I currently use trackpad for pan and buttons for zoom as a workaround when only using trackpad, but everything on the trackpad like when using the map would be better (https://www.reddit.com/r/digiKam/comments/1pqg6dy/trackpad_gestures_in_preview_mode/)
Comment 4 caulier.gilles 2025-12-20 08:56:09 UTC
Q : Which kind of computer + OS did you uses with a trackpad and gestures support ?
Comment 5 Nick_FR 2025-12-20 09:14:33 UTC
(In reply to caulier.gilles from comment #4)
> Q : Which kind of computer + OS did you uses with a trackpad and gestures
> support ?

Sorry Gilles, it's true that I forgot this very important information! For me, it's a MacBook / macOS 15 (until macOS 26 is in better shape...)
Comment 6 caulier.gilles 2025-12-20 11:15:23 UTC
ok i will prepare the code to support the gesture, but i don't have yet a linux machine with a trackpad.

My macbook pro has all the stuff, but hacking is complicated and longer that with Linux. My UTM VM with Linux do now emulte the Macbook trackpad.

I will use later my office Dell Linux laptop while Christmas time. So wait few days for a digiKam 8.9.0 test version.

Gilles Caulier
Comment 7 Nick_FR 2025-12-20 20:19:51 UTC
Amazing, thank you very much!
Comment 8 caulier.gilles 2025-12-22 09:20:01 UTC
Git commit 9efe5a78102d58d4aa017c55329703e35d29f02b by Gilles Caulier.
Committed on 22/12/2025 at 09:16.
Pushed by cgilles into branch 'master'.

First support of gesture events in preview widget. Supported events are:

- Pinch gesture event to zoom preview in/out centered on mouse position.
- Pan gesture event to move zoomed preview contents.
- Swipe gesture event to change current preview item (previous/next).

Only the Pan gesture event can be tested under Linux, as gesture support is limited.

macOS and Windows need more testing for all events supported.

M  +1    -1    core/app/DigikamExportAPI.cmake
M  +106  -0    core/libs/widgets/graphicsview/graphicsdimgview.cpp
M  +6    -0    core/libs/widgets/graphicsview/graphicsdimgview.h
M  +18   -0    core/libs/widgets/graphicsview/singlephotopreviewlayout.cpp
M  +1    -0    core/libs/widgets/graphicsview/singlephotopreviewlayout.h

https://invent.kde.org/graphics/digikam/-/commit/9efe5a78102d58d4aa017c55329703e35d29f02b
Comment 9 caulier.gilles 2025-12-22 09:25:07 UTC
Hi all,

VoilĂ , the gesture events support is implemented but partially tested. The best OS to check all support will be macOS. The builds will be available while today at this place (after 1:00PM Paris time) :

https://files.kde.org/digikam/

Thanks for your feedback

Best regards

Gilles Caulier
Comment 10 caulier.gilles 2025-12-22 09:28:28 UTC
Created attachment 187865 [details]
Plasma 5 from Kubuntu 24.04 LTS trackpad support.

The Linux KDE Plasma 5 from Kubuntu 24.04 has a limited support of trackpad/gesture support.
Comment 11 caulier.gilles 2025-12-22 09:30:41 UTC
Here the test computer is a DELL Precision 7680 laptop :

https://www.dell.com/en-us/shop/dell-laptops/precision-7680-workstation/spd/precision-16-7680-laptop/xctop7680usvp
Comment 12 caulier.gilles 2025-12-22 15:59:22 UTC
tested on my macbook pro : it works as expected.
Comment 13 Nick_FR 2025-12-22 22:43:11 UTC
At first, I thought the swipe wasn't working, but then I realized I needed to use four fingers (maybe it would be a good idea to accept three fingers as well?). Otherwise, everything works great on my MacBook, thank you!
Comment 14 caulier.gilles 2025-12-23 02:05:23 UTC
Under macOS, by default 3 fingers is used to switch between applications. In Control Center, set 4 fingers to switch between Applications and 3 fingers ti change pages, et voila...

Gilles Caulier