diff options
| author | Eduard Manta <[email protected]> | 2020-12-22 22:16:52 +0000 |
|---|---|---|
| committer | Eduard Manta <[email protected]> | 2020-12-23 17:17:19 +0100 |
| commit | 303740c68af83f45be1bdea56a250397a83efa6a (patch) | |
| tree | 9535ea1641317e359b79f396e067a3597b89aa38 /src/kitemviews/kitemlistcontainer.cpp | |
| parent | 125c7aba09cea4ce0f7a1e0106e4eec0f1aa8c9f (diff) | |
Fix vertical scroll with horizontal component not being recognized properly
BUG: 430532
a scroll that includes an horizontal component != 0 might still be a vertical scroll
Diffstat (limited to 'src/kitemviews/kitemlistcontainer.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistcontainer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kitemviews/kitemlistcontainer.cpp b/src/kitemviews/kitemlistcontainer.cpp index 77847bcc7..f253cda53 100644 --- a/src/kitemviews/kitemlistcontainer.cpp +++ b/src/kitemviews/kitemlistcontainer.cpp @@ -172,8 +172,8 @@ void KItemListContainer::wheelEvent(QWheelEvent* event) return; } - const bool scrollHorizontally = (event->angleDelta().x() != 0) || - (event->angleDelta().y() != 0 && !verticalScrollBar()->isVisible()); + const bool scrollHorizontally = (qAbs(event->angleDelta().y()) < qAbs(event->angleDelta().x())) || + (!verticalScrollBar()->isVisible()); KItemListSmoothScroller* smoothScroller = scrollHorizontally ? m_horizontalSmoothScroller : m_verticalSmoothScroller; |
