Bug 295571

Summary: Mouse wheel scrolling in Dolphin ignores global setting
Product: [Applications] dolphin Reporter: Jared B. <nitro>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: a.skembris, bugs.kde.attila, cyberbeat, dev+kde, emmanuelpescosta099, frank78ac, greg, james.pittman.0210, kollix, lukas.schneiderbauer, mat, mcv, naelphin, ronpaul2999, samrog131, shlomif, wulf.richartz, yjcoshc
Priority: NOR    
Version: 2.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 16.04
Sentry Crash Report:

Description Jared B. 2012-03-09 03:24:15 UTC
As of Dolphin 2.0, mouse wheel scrolling ignores the global KDE "Mouse wheel scrolls by" setting, making scrolling too fast/jumpy (for me, at least).  The default value for this setting is 3 lines, but Dolphin now always scrolls by 6 lines.  If I try changing this setting to 10 lines, Dolphin still scrolls by 6.  It would be nice if Dolphin respected this setting again, as it did before 2.0.

As it stands now, when I scroll down to pull a particular file into the visible portion of the pane, it often overshoots and I need to scroll back up (deliberately much more slowly) to find it again.  It seems weird to say it's "too fast", but it makes navigation difficult, and this problem never existed before 2.0.

This seems to affecting any scrollable panels in Dolphin - I see it with both the main pane (details view) as well as the folders panel.
Comment 1 Frank Steinmetzger 2012-08-22 20:24:11 UTC
I discovered another side-effect of this bug: Dolphin ignores the Shift key.
In the whole of KDE, pressing Shift while turning the scroll wheel (or using the scroll function of a touchpad) scrolls by a whole page instead of a number of lines. This is a very handy feature (dearly missed whenever I'm in Windows :) ).

It seems Dolphin is overwriting the scrolling behaviour. As to the OP's report: my Dolphin scrolls by 11 lines in details view, and on a friend's machine it scrolls 7 lines (both at the lowest icon size). We both have the default 3 lines set as scrolling distance.
Comment 2 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:19:59 UTC
Resetting assignee to default as per bug #305719
Comment 3 Frank Reininghaus 2013-04-26 12:58:45 UTC
*** Bug 316580 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Feck 2013-10-30 09:23:13 UTC
*** Bug 326866 has been marked as a duplicate of this bug. ***
Comment 5 Frank Reininghaus 2015-09-15 20:30:23 UTC
*** Bug 352753 has been marked as a duplicate of this bug. ***
Comment 6 Frank Reininghaus 2015-09-15 20:31:09 UTC
On high DPI displays, the effect of the problem may be even more severe (see bug 352753).
Comment 7 MichaƂ 2015-09-15 20:58:39 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 Shlomi Fish 2015-09-18 18:42:06 UTC
I ran into this problem with dolphin-15.08.0 on KDE Frameworks 5.13.0 and qt 5.5.0 on Mageia Linux x86-64 v6. Very annoying. also see https://bugs.mageia.org/show_bug.cgi?id=16589 . Very annoying.
Comment 9 Gary Niger 2015-09-21 14:20:39 UTC
15.08.1 on Arch Linux also confirmed.
Comment 10 james.pittman.0210 2015-10-22 15:56:46 UTC
Would like to confirm that this issue still exists in 15.08.2 in Arch Linux and that this problem is incredibly pronounced on systems utilising a trackpad - with the scrolling effect appearing to be both erratic and hit-and-miss as to whether or not one may scroll at all.
Comment 11 Lukas Schneiderbauer 2016-01-13 16:42:18 UTC
Confirming for dolphin 15.08.3 with KF 5.18.0, qt 5.5.1 on Gentoo LInux and 160-dpi screen.
Comment 12 Emmanuel Pescosta 2016-01-13 17:00:01 UTC
Review https://git.reviewboard.kde.org/r/126718/

This bug has been fixed in master.
Fix will be shipped with Dolphin 16.04.
Comment 13 Shlomi Fish 2016-01-14 14:37:58 UTC
(In reply to Emmanuel Pescosta from comment #12)
> Review https://git.reviewboard.kde.org/r/126718/
> 
> This bug has been fixed in master.
> Fix will be shipped with Dolphin 16.04.

for me, building the new dolphin from git master source on Mageia Linux x86-64 v6 does not seem to fix the problem. The only way I can get it to work is using this patch that I don't expect to be applied as is :

diff --git a/src/kitemviews/kitemlistcontainer.cpp b/src/kitemviews/kitemlistcontainer.cpp
index 94b49db..a48e92f 100644
--- a/src/kitemviews/kitemlistcontainer.cpp
+++ b/src/kitemviews/kitemlistcontainer.cpp
@@ -34,6 +34,7 @@
 #include <QScrollBar>
 #include <QStyle>
 #include <QStyleOption>
+#include <cstdio>
 
 
 /**
@@ -167,6 +168,7 @@ void KItemListContainer::scrollContentsBy(int dx, int dy)
 
 void KItemListContainer::wheelEvent(QWheelEvent* event)
 {
+    printf ("[PinkiePie]qApp->wheelScrollLines() == %ld\n", (long)qApp->wheelScrollLines());
     if (event->modifiers().testFlag(Qt::ControlModifier)) {
         event->ignore();
         return;
@@ -184,7 +186,7 @@ void KItemListContainer::wheelEvent(QWheelEvent* event)
                                               m_horizontalSmoothScroller : m_verticalSmoothScroller;
 
     const QScrollBar* scrollBar = smoothScroller->scrollBar();
-    if (!event->pixelDelta().isNull()) {
+    if (false) { //if (!event->pixelDelta().isNull()) {
         const int numPixels =  event->pixelDelta().y();
         if (event->modifiers().testFlag(Qt::ShiftModifier)) {
             const int scrollingDirection = numPixels > 0 ? 1 : -1;
@@ -194,6 +196,7 @@ void KItemListContainer::wheelEvent(QWheelEvent* event)
         }
     } else {
         const int numDegrees = event->angleDelta().y() / 8;
+        printf ("qApp->wheelScrollLines() == %ld\n", (long)qApp->wheelScrollLines());
         const int numSteps = qApp->wheelScrollLines() * numDegrees / 15;
         if (event->modifiers().testFlag(Qt::ShiftModifier)) {
             const int scrollingDirection = numSteps > 0 ? 1 : -1;
diff --git a/src/kitemviews/private/kitemlistsmoothscroller.cpp b/src/kitemviews/private/kitemlistsmoothscroller.cpp
index c89d3cf..5af16df 100644
--- a/src/kitemviews/private/kitemlistsmoothscroller.cpp
+++ b/src/kitemviews/private/kitemlistsmoothscroller.cpp
@@ -25,6 +25,7 @@
 #include <QScrollBar>
 #include <QWheelEvent>
 #include <QStyle>
+#include <cstdio>
 
 KItemListSmoothScroller::KItemListSmoothScroller(QScrollBar* scrollBar,
                                                  QObject* parent) :
@@ -201,6 +202,7 @@ void KItemListSmoothScroller::handleWheelEvent(QWheelEvent* event)
         numPixels = event->pixelDelta().y();
     } else {
         const int numDegrees = event->angleDelta().y() / 8;
+        printf ("qApp->wheelScrollLines() == %ld\n", (long)qApp->wheelScrollLines());
         const int numSteps = qApp->wheelScrollLines() * numDegrees / 15;
         numPixels = numSteps * m_scrollBar->pageStep() / 12;
     }
Comment 14 Emmanuel Pescosta 2016-01-14 14:46:36 UTC
(In reply to Shlomi Fish from comment #13)

When the real srolling distance (pixelDelta) is available, then Dolphin will use it to scroll the content. This is exactly what the documentation of pixelDelta [1] says: "The value should be used directly to scroll content on screen." 

This bug (and also the patch) is about the case where no pixelDelta is available.

[1] https://doc.qt.io/qt-5/qwheelevent.html#pixelDelta
Comment 15 Emmanuel Pescosta 2016-01-14 14:53:39 UTC
(In reply to Shlomi Fish from comment #13)

Please have a look at bug 357618 [1]

[1] https://bugs.kde.org/show_bug.cgi?id=357618
Comment 16 Greg Lepore 2016-04-21 13:17:30 UTC
I'm running 16.04, Dolphin version 15.12.3 and this issue does not appear to be fixed, Dolphin is still scrolling 6 lines per wheel click.
Comment 17 Rog131 2016-04-21 18:01:14 UTC
(In reply to Greg Lepore from comment #16)
> I'm running 16.04, Dolphin version 15.12.3 and this issue does not appear to
> be fixed, Dolphin is still scrolling 6 lines per wheel click.

Kubuntu 16.04 ?

The bug is fixed with the Dolphin version 16.04 - The KDE Applications 16.04 will be released: https://community.kde.org/Schedules/Applications/16.04_Release_Schedule - 'Wednesday, April 20, 2016'

At here with the Arch Linux - Dolphin 16.04 RC (16.03.90) is following global settings.
Comment 18 Angelos Skembris 2016-06-05 02:06:18 UTC
I just updated to 16.04.1via the Tumbleweed repos and I seem to get the painfully slow version of this bug. I am on a 24" display with 2560X1440 resolution. 

Is there at least a workaround? It is really annoying.
Comment 19 Attila 2016-06-22 10:35:40 UTC
(In reply to Emmanuel Pescosta from comment #12)
> Review https://git.reviewboard.kde.org/r/126718/
> 
> This bug has been fixed in master.
> Fix will be shipped with Dolphin 16.04.

The fix doesn't work.
Fedora 24
Dolphin 16.04.1
KDE Frameworks 5.22.0
Qt 5.6.0

Do you need additional informations?
Comment 20 Attila 2016-06-24 09:34:03 UTC
Please reopen this bug report and change the status to confirmed.
Comment 21 H.H. 2016-07-09 08:06:01 UTC
For me this bug still exists in dolphin 16.04.2.

I found 4 similar bugs about this:
https://bugs.kde.org/show_bug.cgi?id=357618 (with a workaround by uninstalling "xf86-input-libinput")
https://bugs.kde.org/show_bug.cgi?id=295571
https://bugs.kde.org/show_bug.cgi?id=291144
https://bugs.kde.org/show_bug.cgi?id=358080
Comment 22 Attila 2016-07-11 06:36:40 UTC
A workaround for Fedora 24:

- erase the rpm xorg-x11-drv-libinput
- install (if not installed) the rpm xorg-x11-drv-evdev

Reboot your system. This is it.

Nevertheless this nasty bug should be fixed, because it affects many parts and applications in KDE, not just Dolphin.
Comment 23 Greg Lepore 2016-10-19 12:04:54 UTC
Still not fixed in 16.04.2, please reopen and confirm.
KDE Frameworks 5.26.0
Qt 5.6.1 (built against 5.6.1)
The xcb windowing system
Comment 24 Elvis Angelaccio 2016-12-10 13:42:50 UTC
*** Bug 354763 has been marked as a duplicate of this bug. ***