┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEduard Manta <[email protected]>2020-12-22 22:16:52 +0000
committerEduard Manta <[email protected]>2020-12-23 17:17:19 +0100
commit303740c68af83f45be1bdea56a250397a83efa6a (patch)
tree9535ea1641317e359b79f396e067a3597b89aa38 /src
parent125c7aba09cea4ce0f7a1e0106e4eec0f1aa8c9f (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')
-rw-r--r--src/kitemviews/kitemlistcontainer.cpp4
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;