From: Nate Graham Date: Sat, 21 Dec 2019 18:54:53 +0000 (-0700) Subject: Merge branch 'release/19.12' X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/080498368502bfbdc4e13427ba3a9a21cefcafdf?hp=-c Merge branch 'release/19.12' --- 080498368502bfbdc4e13427ba3a9a21cefcafdf diff --combined src/kitemviews/kitemlistcontainer.cpp index a3cafc838,b274e75e2..6279b15a9 --- a/src/kitemviews/kitemlistcontainer.cpp +++ b/src/kitemviews/kitemlistcontainer.cpp @@@ -1,7 -1,8 +1,7 @@@ /*************************************************************************** * Copyright (C) 2011 by Peter Penz * * * - * Based on the Itemviews NG project from Trolltech Labs: * - * http://qt.gitorious.org/qt-labs/itemviews-ng * + * Based on the Itemviews NG project from Trolltech Labs * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@@ -26,6 -27,7 +26,7 @@@ #include "private/kitemlistsmoothscroller.h" #include + #include #include #include #include @@@ -260,7 -262,14 +261,14 @@@ void KItemListContainer::updateScrollOf if (view->scrollOrientation() == Qt::Vertical) { smoothScroller = m_verticalSmoothScroller; scrollOffsetScrollBar = verticalScrollBar(); - singleStep = view->itemSizeHint().height(); + + // Don't scroll super fast when using a wheel mouse: + // We want to consider one "line" to be the text label which has a + // roughly fixed height rather than using the height of the icon which + // may be very tall + const QFontMetrics metrics(font()); + singleStep = metrics.height() * QApplication::wheelScrollLines(); + // We cannot use view->size().height() because this height might // include the header widget, which is not part of the scrolled area. pageStep = view->verticalPageStep(); diff --combined src/kitemviews/kitemlistview.cpp index 5dd21615e,e64e226ab..5665d9b9c --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@@ -1,7 -1,8 +1,7 @@@ /*************************************************************************** * Copyright (C) 2011 by Peter Penz * * * - * Based on the Itemviews NG project from Trolltech Labs: * - * http://qt.gitorious.org/qt-labs/itemviews-ng * + * Based on the Itemviews NG project from Trolltech Labs * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@@ -334,11 -335,6 +334,6 @@@ QSizeF KItemListView::itemSize() cons return m_itemSize; } - QSizeF KItemListView::itemSizeHint() const - { - return m_sizeHintResolver->minSizeHint(); - } - const KItemListStyleOption& KItemListView::styleOption() const { return m_styleOption; diff --combined src/kitemviews/kitemlistview.h index 982df1c20,3dff35a63..2a3b7ada2 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@@ -1,7 -1,8 +1,7 @@@ /*************************************************************************** * Copyright (C) 2011 by Peter Penz * * * - * Based on the Itemviews NG project from Trolltech Labs: * - * http://qt.gitorious.org/qt-labs/itemviews-ng * + * Based on the Itemviews NG project from Trolltech Labs * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@@ -157,11 -158,6 +157,6 @@@ public */ QSizeF itemSize() const; - /** - * @return The size hint of all items. It is provided by the KItemListSizeHintResolver. - */ - QSizeF itemSizeHint() const; - const KItemListStyleOption& styleOption() const; void setGeometry(const QRectF& rect) override;