diff options
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 232b4140..0a282f1b 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -2351,7 +2351,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
2351 | which device is sending the event. */ | 2351 | which device is sending the event. */ |
2352 | if (ev->wheel.which == 0) { /* Trackpad with precise scrolling w/inertia. */ | 2352 | if (ev->wheel.which == 0) { /* Trackpad with precise scrolling w/inertia. */ |
2353 | stop_Anim(&d->scrollY); | 2353 | stop_Anim(&d->scrollY); |
2354 | iInt2 wheel = init_I2(ev->wheel.x, ev->wheel.y); | 2354 | iInt2 wheel = mulf_I2(init_I2(ev->wheel.x, ev->wheel.y), get_Window()->pixelRatio); |
2355 | /* Only scroll on one axis at a time. */ | 2355 | /* Only scroll on one axis at a time. */ |
2356 | if (iAbs(wheel.x) > iAbs(wheel.y)) { | 2356 | if (iAbs(wheel.x) > iAbs(wheel.y)) { |
2357 | wheel.y = 0; | 2357 | wheel.y = 0; |
@@ -2359,8 +2359,11 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
2359 | else { | 2359 | else { |
2360 | wheel.x = 0; | 2360 | wheel.x = 0; |
2361 | } | 2361 | } |
2362 | scroll_DocumentWidget_(d, -wheel.y * get_Window()->pixelRatio); | 2362 | scroll_DocumentWidget_(d, -wheel.y); |
2363 | scrollWideBlock_DocumentWidget_(d, mouseCoord, wheel.x * get_Window()->pixelRatio, 0); | 2363 | #if defined (iPlatformAppleMobile) |
2364 | wheel.x = -wheel.x; | ||
2365 | #endif | ||
2366 | scrollWideBlock_DocumentWidget_(d, mouseCoord, wheel.x, 0); | ||
2364 | } | 2367 | } |
2365 | else | 2368 | else |
2366 | #endif | 2369 | #endif |