From bbe0f89c242bb11cbcae89aee9110fee56a5f8a2 Mon Sep 17 00:00:00 2001 From: Adrian Holfter Date: Thu, 16 May 2019 14:39:02 +0200 Subject: implement horizontal scrolling while holding shift (only if shift-to-scroll is disabled) --- src/gui/tikzview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/tikzview.cpp b/src/gui/tikzview.cpp index 3615685..3479d22 100644 --- a/src/gui/tikzview.cpp +++ b/src/gui/tikzview.cpp @@ -149,6 +149,8 @@ void TikzView::wheelEvent(QWheelEvent *event) } else if (event->angleDelta().y() < 0) { zoomOut(); } + } else if (event->modifiers() & Qt::ShiftModifier) { + horizontalScrollBar()->setValue(horizontalScrollBar()->value() + event->angleDelta().y()); } } -- cgit v1.2.3 From e1207288d547dbe2f427824f88d1345f1c3acd91 Mon Sep 17 00:00:00 2001 From: Adrian Holfter Date: Wed, 29 Apr 2020 16:55:35 +0200 Subject: invert horizontal scrolling so it behaves the same as e.g. gimp --- src/gui/tikzview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/tikzview.cpp b/src/gui/tikzview.cpp index 3479d22..eb87002 100644 --- a/src/gui/tikzview.cpp +++ b/src/gui/tikzview.cpp @@ -150,7 +150,7 @@ void TikzView::wheelEvent(QWheelEvent *event) zoomOut(); } } else if (event->modifiers() & Qt::ShiftModifier) { - horizontalScrollBar()->setValue(horizontalScrollBar()->value() + event->angleDelta().y()); + horizontalScrollBar()->setValue(horizontalScrollBar()->value() - event->angleDelta().y()); } } -- cgit v1.2.3