davidhurka added a comment.
Sorry for testing it so late, now that I’m working on PageView. I don’t like this much, see inline comment. Do you mind if I change it to error accumulation at some time? INLINE COMMENTS > pageview.cpp:3760 > + > + if (pos.x() < horizontalScrollBar()->value()) > d->dragScrollVector.setX((pos.x() - horizontalScrollBar()->value())/damping); > + else if (horizontalScrollBar()->value() + viewport()->width() < pos.x()) > d->dragScrollVector.setX((pos.x() - horizontalScrollBar()->value() - > viewport()->width())/damping); This is only integer arithmetic, so `damping = 6` makes the edge scrolling feel a bit coarse. Crossing the edge only 5 pixels does nothing, but dragging only one pixel further gives “full speed”. I would place `damping` in slotDragScroll(), which can do smoothing by error accumulation. (Bresenham and so on.... ;) ) REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D20437 To: kezik, #okular, aacid, sander, ngraham Cc: davidhurka, sander, ngraham, aacid, ahmedbilal, okular-devel, kezik, joaonetto, tfella, darcyshen