From: Eduard Manta Date: Tue, 22 Dec 2020 22:16:52 +0000 (+0000) Subject: Fix vertical scroll with horizontal component not being recognized properly X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/303740c68af83f45be1bdea56a250397a83efa6a 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 --- 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;