From f688bcd1f14175f1624e2abcc6452882448467c0 Mon Sep 17 00:00:00 2001 From: "Martin T. H. Sandsmark" Date: Wed, 13 Jul 2016 00:29:15 +0200 Subject: Fix scrolling on hidpi screens Scrolling with libinput was unbearably slow. QScrollBar is much better at scrolling than us, so let it handle it. REVIEW: 128432 BUG: 357618 --- src/kitemviews/private/kitemlistsmoothscroller.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/kitemviews/private/kitemlistsmoothscroller.h') diff --git a/src/kitemviews/private/kitemlistsmoothscroller.h b/src/kitemviews/private/kitemlistsmoothscroller.h index fca4b0c53..a3576a3fd 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.h +++ b/src/kitemviews/private/kitemlistsmoothscroller.h @@ -77,6 +77,11 @@ public: // stable. bool requestScrollBarUpdate(int newMaximum); + /** + * Forwards wheel events to the scrollbar, ensuring smooth and proper scrolling + */ + void handleWheelEvent(QWheelEvent* event); + protected: virtual bool eventFilter(QObject* obj, QEvent* event); @@ -84,13 +89,6 @@ private slots: void slotAnimationStateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); -private: - /** - * Results into a smooth-scrolling of the target dependent on the direction - * of the wheel event. - */ - void handleWheelEvent(QWheelEvent* event); - private: bool m_scrollBarPressed; bool m_smoothScrolling; -- cgit v1.3