override maxYExtent otherwise we start gaining space at the bottom
commit31cf0c6ebfaf2adf1f5ddb763851e3c8032a85f7
authorAlbert Astals Cid <albert.astals@canonical.com>
dateTue 19 Apr 2016, 17:20 (11 years ago)
parentd5585fd
plugins/Dash/listviewwithpageheader.cpp+5
@@ -514,6 +514,11 @@ qreal ListViewWithPageHeader::minYExtent() const
514514 return m_minYExtent;
515515}
516516
517+qreal ListViewWithPageHeader::maxYExtent() const
518+{
519+ return height() - contentHeight();
520+}
521+
517522void ListViewWithPageHeader::componentComplete()
518523{
519524 if (m_delegateModel)
plugins/Dash/listviewwithpageheader.h+1
@@ -115,6 +115,7 @@ protected:
115115 void componentComplete() override;
116116 void viewportMoved(Qt::Orientations orient) override;
117117 qreal minYExtent() const override;
118+ qreal maxYExtent() const override;
118119 void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) override;
119120 void itemImplicitHeightChanged(QQuickItem *item) override;
120121 void updatePolish() override;
tests/plugins/Dash/listviewwithpageheadertest.cpp+1−1
@@ -1981,7 +1981,7 @@ private Q_SLOTS:
19811981 {
19821982 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 3), Q_ARG(QVariant, 3));
19831983
1984− for (int i = 0; i < 5; ++i) {
1984+ for (int i = 0; i < 10; ++i) {
19851985 scrollToBottom();
19861986 lvwph->showHeader();
19871987 QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());