]> cloud.milkyroute.net Git - dolphin.git/commit
Fix slow scrolling in dock panels
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 20 Nov 2016 11:21:29 +0000 (12:21 +0100)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 20 Nov 2016 11:59:51 +0000 (12:59 +0100)
commit90beb4a5e37b887caad1e767046a42dad0af1ab3
tree27ec05401c5eff1038d41fe1e1092338c0fc9e19
parent3187c511c4aea82b954915387567d0d4e88f124e
Fix slow scrolling in dock panels

Commit f688bcd1f1 fixed slow scrolling with xf86-input-libinput on DolphinView.

However the commit also exposed a bug in the Dolphin scrolling
algorithm, which was previously hidden. This resulted in slow
scrolling in dock panels (Places and Folders), with both
xf86-input-evdev and xf86-input-libinput drivers, as well as libinput on
Wayland.

KItemListContainer::updateScrollOffsetScrollBar() relied on the view's
itemSize() method to compute the scrollbar's singleStep, but this QSize
was invalid for the dock panels' views.

We use a new itemSizeHint() method instead, which is always valid and
also adapts to the current icon size set in the view.

BUG: 365968
FIXED-IN: 16.12.0
REVIEW: 129409
src/kitemviews/kitemlistcontainer.cpp
src/kitemviews/kitemlistview.cpp
src/kitemviews/kitemlistview.h
src/kitemviews/private/kitemlistsizehintresolver.cpp
src/kitemviews/private/kitemlistsizehintresolver.h