on xenial help sign in
override maxYExtent otherwise we start gaining space at the bottom
31cf0c6Albert Astals Cid
plugins/Dash/listviewwithpageheader.cpp+5
@@ -514,6 +514,11 @@ qreal ListViewWithPageHeader::minYExtent() const
514 return m_minYExtent;
514 return m_minYExtent;
515}
515}
516
516
517+qreal ListViewWithPageHeader::maxYExtent() const
518+{
519+ return height() - contentHeight();
520+}
521+
517void ListViewWithPageHeader::componentComplete()
522void ListViewWithPageHeader::componentComplete()
518{
523{
519 if (m_delegateModel)
524 if (m_delegateModel)
plugins/Dash/listviewwithpageheader.h+1
@@ -115,6 +115,7 @@ protected:
115 void componentComplete() override;
115 void componentComplete() override;
116 void viewportMoved(Qt::Orientations orient) override;
116 void viewportMoved(Qt::Orientations orient) override;
117 qreal minYExtent() const override;
117 qreal minYExtent() const override;
118+ qreal maxYExtent() const override;
118 void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) override;
119 void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) override;
119 void itemImplicitHeightChanged(QQuickItem *item) override;
120 void itemImplicitHeightChanged(QQuickItem *item) override;
120 void updatePolish() override;
121 void updatePolish() override;
tests/plugins/Dash/listviewwithpageheadertest.cpp+1−1
@@ -1981,7 +1981,7 @@ private Q_SLOTS:
1981 {
1981 {
1982 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 3), Q_ARG(QVariant, 3));
1982 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 3), Q_ARG(QVariant, 3));
1983
1983
1984− for (int i = 0; i < 5; ++i) {
1984+ for (int i = 0; i < 10; ++i) {
1985 scrollToBottom();
1985 scrollToBottom();
1986 lvwph->showHeader();
1986 lvwph->showHeader();
1987 QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1987 QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());