diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-20 17:06:42 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-20 17:06:42 +0300 |
commit | ee2dc3a919e2ebea0d0f786e29daea26fec38c93 (patch) | |
tree | 99ed9b7cc88e97bf7567e7debff37b02ed17ceaa /src | |
parent | 4bd016cf3125b8341d0c690e9e3ecace582f54d7 (diff) |
iOS: Haptic tap at 100% pinch zoom
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/documentwidget.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 2229b7f7..d847c19f 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1747,6 +1747,11 @@ static iBool handlePinch_DocumentWidget_(iDocumentWidget *d, const char *cmd) { | |||
1747 | int zoom = iRound(d->pinchZoomInitial * rel / 5.0f) * 5; | 1747 | int zoom = iRound(d->pinchZoomInitial * rel / 5.0f) * 5; |
1748 | zoom = iClamp(zoom, 50, 200); | 1748 | zoom = iClamp(zoom, 50, 200); |
1749 | if (d->pinchZoomPosted != zoom) { | 1749 | if (d->pinchZoomPosted != zoom) { |
1750 | #if defined (iPlatformAppleMobile) | ||
1751 | if (zoom == 100) { | ||
1752 | playHapticEffect_iOS(tap_HapticEffect); | ||
1753 | } | ||
1754 | #endif | ||
1750 | d->pinchZoomPosted = zoom; | 1755 | d->pinchZoomPosted = zoom; |
1751 | postCommandf_App("zoom.set arg:%d", zoom); | 1756 | postCommandf_App("zoom.set arg:%d", zoom); |
1752 | } | 1757 | } |