diff options
| author | Martin T. H. Sandsmark <[email protected]> | 2016-07-13 00:29:15 +0200 |
|---|---|---|
| committer | Martin T. H. Sandsmark <[email protected]> | 2016-07-16 18:47:02 +0200 |
| commit | f688bcd1f14175f1624e2abcc6452882448467c0 (patch) | |
| tree | e396225b381a3ed9680a5067b3d6481b88439605 /src/kitemviews/private/kitemlistsmoothscroller.h | |
| parent | 4fad4405a719a43968f0ff5e99b169cd5a81df5c (diff) | |
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
Diffstat (limited to 'src/kitemviews/private/kitemlistsmoothscroller.h')
| -rw-r--r-- | src/kitemviews/private/kitemlistsmoothscroller.h | 12 |
1 files changed, 5 insertions, 7 deletions
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); @@ -85,13 +90,6 @@ private slots: 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; QScrollBar* m_scrollBar; |
