Commit 2e1ddaa1 authored by David Hurka's avatar David Hurka 🐬
Browse files

Enable horizontal mouse wrap for Browse tool drag scrolling

Also fixes calculation of wrap edges, where top and bottom edge were swapped.

BUG: 371904
parent 8a39d598
Pipeline #57571 passed with stage
in 10 minutes and 39 seconds
......@@ -2192,8 +2192,10 @@ void PageView::mouseMoveEvent(QMouseEvent *e)
// Wrap mouse cursor
Qt::Edges wrapEdges;
wrapEdges.setFlag(Qt::TopEdge, verticalScrollBar()->value() > verticalScrollBar()->minimum());
wrapEdges.setFlag(Qt::BottomEdge, verticalScrollBar()->value() < verticalScrollBar()->maximum());
wrapEdges.setFlag(Qt::TopEdge, verticalScrollBar()->value() < verticalScrollBar()->maximum());
wrapEdges.setFlag(Qt::BottomEdge, verticalScrollBar()->value() > verticalScrollBar()->minimum());
wrapEdges.setFlag(Qt::LeftEdge, horizontalScrollBar()->value() < horizontalScrollBar()->maximum());
wrapEdges.setFlag(Qt::RightEdge, horizontalScrollBar()->value() > horizontalScrollBar()->minimum());
d->mouseGrabOffset -= CursorWrapHelper::wrapCursor(e->pos(), wrapEdges);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment