summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 48eb482f..6d3e7a9c 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -864,11 +864,16 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
864 } 864 }
865 } 865 }
866 else if (ev->type == SDL_MOUSEWHEEL) { 866 else if (ev->type == SDL_MOUSEWHEEL) {
867#if defined (iPlatformApple)
868 /* Momentum scrolling. */
869 scroll_DocumentWidget_(d, -ev->wheel.y * get_Window()->pixelRatio);
870#else
867 if (keyMods_Sym(SDL_GetModState()) == KMOD_PRIMARY) { 871 if (keyMods_Sym(SDL_GetModState()) == KMOD_PRIMARY) {
868 changeTextSize_DocumentWidget_(d, ev->wheel.y > 0 ? 10 : -10); 872 changeTextSize_DocumentWidget_(d, ev->wheel.y > 0 ? 10 : -10);
869 return iTrue; 873 return iTrue;
870 } 874 }
871 scroll_DocumentWidget_(d, -3 * ev->wheel.y * lineHeight_Text(default_FontId)); 875 scroll_DocumentWidget_(d, -3 * ev->wheel.y * lineHeight_Text(default_FontId));
876#endif
872 return iTrue; 877 return iTrue;
873 } 878 }
874 else if (ev->type == SDL_MOUSEMOTION) { 879 else if (ev->type == SDL_MOUSEMOTION) {