diff options
| author | Marco Martin <[email protected]> | 2016-01-12 14:01:51 +0100 |
|---|---|---|
| committer | Marco Martin <[email protected]> | 2016-01-12 14:01:51 +0100 |
| commit | 570d0e55b6bb77bd2da49704693dbcf0e2e7cb54 (patch) | |
| tree | a4837c6267c2edbbdbbf352262a2cc42320ed199 /src/kitemviews/kitemlistcontainer.cpp | |
| parent | a3acc36a665af93286657e424f0b8deb445ad4b8 (diff) | |
Take into account QApplication::wheelScrollLines() in wheel events
when setting a different "mouse wheel scrolls by" value in the
mouse kcm, the user expects every view to scroll more or less
accordingly (even if it's not strictlya text view)
This makes the scroll in dolphin take that into account
REVIEW:126718
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 c9d521ce7..94b49dbde 100644 --- a/src/kitemviews/kitemlistcontainer.cpp +++ b/src/kitemviews/kitemlistcontainer.cpp @@ -194,12 +194,12 @@ void KItemListContainer::wheelEvent(QWheelEvent* event) } } else { const int numDegrees = event->angleDelta().y() / 8; - const int numSteps = numDegrees / 15; + const int numSteps = qApp->wheelScrollLines() * numDegrees / 15; if (event->modifiers().testFlag(Qt::ShiftModifier)) { const int scrollingDirection = numSteps > 0 ? 1 : -1; smoothScroller->scrollTo(scrollBar->value() - scrollBar->pageStep() * scrollingDirection); } else { - smoothScroller->scrollTo(scrollBar->value() - numSteps * scrollBar->pageStep() / 4); + smoothScroller->scrollTo(scrollBar->value() - numSteps * scrollBar->pageStep() / 12); } } |
