]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/private/kitemlistsmoothscroller.cpp
Merge branch 'Applications/16.04'
[dolphin.git] / src / kitemviews / private / kitemlistsmoothscroller.cpp
index 2bd467aa53833ea3d4e436dde4c7cc7597a56b01..c89d3cf8f8d64d9e9f33d805b1b28764bd8ae573 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "kitemlistsmoothscroller.h"
 
+#include <QApplication>
 #include <QEvent>
 #include <QPropertyAnimation>
 #include <QScrollBar>
@@ -200,8 +201,8 @@ void KItemListSmoothScroller::handleWheelEvent(QWheelEvent* event)
         numPixels = event->pixelDelta().y();
     } else {
         const int numDegrees = event->angleDelta().y() / 8;
-        const int numSteps = numDegrees / 15;
-        numPixels = numSteps * m_scrollBar->pageStep() / 4;
+        const int numSteps = qApp->wheelScrollLines() * numDegrees / 15;
+        numPixels = numSteps * m_scrollBar->pageStep() / 12;
     }
     int value = m_scrollBar->value();
     if (event->modifiers().testFlag(Qt::ShiftModifier)) {