summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-09 06:23:00 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-09 06:23:00 +0300
commit2e336ab65eae652714daccb14e08026c37bb823f (patch)
tree26b870688b6191e8461abf9b981ca56c26ca01bd /src/ui/documentwidget.c
parent3ba6ccad2b31e0368257b3b073da3caf7d567998 (diff)
Tuned mouse wheel smooth scrolling
Removed the two-stage acceleration of mouse wheel scrolling in favor of slightly faster base scrolling speed overall. This makes the behavior more consistent and predictable.
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 7e138902..638906cf 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -3466,11 +3466,11 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
3466 smoothScroll_DocumentWidget_( 3466 smoothScroll_DocumentWidget_(
3467 d, 3467 d,
3468 -3 * amount * lineHeight_Text(paragraph_FontId), 3468 -3 * amount * lineHeight_Text(paragraph_FontId),
3469 smoothDuration_DocumentWidget_(mouse_ScrollType) * 3469 smoothDuration_DocumentWidget_(mouse_ScrollType));
3470 /* accelerated speed for repeated wheelings */ 3470 /* accelerated speed for repeated wheelings */
3471 (!isFinished_SmoothScroll(&d->scrollY) && pos_Anim(&d->scrollY.pos) < 0.25f 3471// * (!isFinished_SmoothScroll(&d->scrollY) && pos_Anim(&d->scrollY.pos) < 0.25f
3472 ? 0.5f 3472// ? 0.5f
3473 : 1.0f)); 3473// : 1.0f));
3474 scrollWideBlock_DocumentWidget_( 3474 scrollWideBlock_DocumentWidget_(
3475 d, mouseCoord, -3 * ev->wheel.x * lineHeight_Text(paragraph_FontId), 167); 3475 d, mouseCoord, -3 * ev->wheel.x * lineHeight_Text(paragraph_FontId), 167);
3476 } 3476 }