From 90beb4a5e37b887caad1e767046a42dad0af1ab3 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Sun, 20 Nov 2016 12:21:29 +0100 Subject: 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/private/kitemlistsizehintresolver.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/kitemviews/private/kitemlistsizehintresolver.h') diff --git a/src/kitemviews/private/kitemlistsizehintresolver.h b/src/kitemviews/private/kitemlistsizehintresolver.h index ff17f2de2..841e9ca10 100644 --- a/src/kitemviews/private/kitemlistsizehintresolver.h +++ b/src/kitemviews/private/kitemlistsizehintresolver.h @@ -36,6 +36,7 @@ class DOLPHIN_EXPORT KItemListSizeHintResolver public: KItemListSizeHintResolver(const KItemListView* itemListView); virtual ~KItemListSizeHintResolver(); + QSizeF maxSizeHint(); QSizeF sizeHint(int index); void itemsInserted(const KItemRangeList& itemRanges); @@ -50,6 +51,7 @@ private: const KItemListView* m_itemListView; mutable QVector m_logicalHeightHintCache; mutable qreal m_logicalWidthHint; + mutable qreal m_logicalHeightHint; bool m_needsResolving; }; -- cgit v1.3