summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2022-01-28 14:55:51 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2022-01-28 14:55:51 +0200
commit2791f810fe53f1225d07ed4680ed87a133bb5ab8 (patch)
tree1cc355b499be0ee1602dd7f30a1c22790ebeada8 /src/ui/documentwidget.c
parent77c92c65353b8ce0c2f22de2c497c4a0ab948d87 (diff)
iOS: Scroll to top on status bar taps
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index beff0f3f..2e15cdce 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -4351,6 +4351,12 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
4351 return iTrue; 4351 return iTrue;
4352 } 4352 }
4353 else if (equal_Command(cmd, "scroll.top") && document_App() == d) { 4353 else if (equal_Command(cmd, "scroll.top") && document_App() == d) {
4354 if (argLabel_Command(cmd, "smooth")) {
4355 stopWidgetMomentum_Touch(w);
4356 smoothScroll_DocumentView_(&d->view, -pos_SmoothScroll(&d->view.scrollY), 500);
4357 d->view.scrollY.flags |= muchSofter_AnimFlag;
4358 return iTrue;
4359 }
4354 init_Anim(&d->view.scrollY.pos, 0); 4360 init_Anim(&d->view.scrollY.pos, 0);
4355 invalidate_VisBuf(d->view.visBuf); 4361 invalidate_VisBuf(d->view.visBuf);
4356 clampScroll_DocumentView_(&d->view); 4362 clampScroll_DocumentView_(&d->view);