on xenial help sign in
Fix header getting lost as per bug 1245824

Needs test

commit9ba807f3ac48a005767e458e0f54484124b4f81a authorAlbert Astals <albert.astals@canonical.com> dateMon 4 Nov 2013, 12:34 (13 years ago) parent0152889
1 file changed+2−2
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp+2−2
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp+2−2
@@ -491,9 +491,9 @@ void ListViewWithPageHeader::viewportMoved(Qt::Orientations orient)
491491 const bool notShownByItsOwn = contentY() + diff >= m_headerItem->y() + m_headerItem->height();
492492 const bool maximizeVisibleAreaRunning = m_contentYAnimation->isRunning() && contentYAnimationType == ContentYAnimationMaximizeVisibleArea;
493493
494− if (!scrolledUp && contentY() == -m_minYExtent) {
494+ if (!scrolledUp && (contentY() == -m_minYExtent || m_previousContentY == m_headerItem->y())) {
495495 m_headerItemShownHeight = 0;
496− m_headerItem->setY(contentY());
496+ m_headerItem->setY(-m_minYExtent);
497497 } else if ((scrolledUp && notRebounding && notShownByItsOwn && !maximizeVisibleAreaRunning) || (m_headerItemShownHeight > 0)) {
498498 if (maximizeVisibleAreaRunning && diff > 0) // If we are maximizing and the header was shown, make sure we hide it
499499 m_headerItemShownHeight -= diff;