~mzanetti/unity8/fix-1648251

« back to all changes in this revision

Viewing changes to plugins/Dash/listviewwithpageheader.cpp

  • Committer: Michael Zanetti
  • Date: 2016-10-13 11:02:11 UTC
  • mfrom: (2525.1.132 unity8)
  • Revision ID: michael.zanetti@canonical.com-20161013110211-tj2gly2dxaqj5t2e
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
587
587
                } else {
588
588
                    m_headerItem->setY(-m_minYExtent);
589
589
                }
 
590
            } else if (m_headerItemShownHeight == 0 && m_previousContentY > m_headerItem->y() && contentY() < m_headerItem->y()) {
 
591
                // The header was hidden but now that we've moved up (e.g. because of item removed) it's visible
 
592
                // make sure it isn't
 
593
                m_headerItem->setY(-m_minYExtent);
590
594
            }
591
595
            Q_EMIT headerItemShownHeightChanged();
592
596
        } else {
978
982
 
979
983
void ListViewWithPageHeader::onHeightChanged()
980
984
{
 
985
    m_clipItem->setHeight(height() - m_headerItemShownHeight);
981
986
    polish();
982
987
}
983
988
 
1388
1393
 
1389
1394
        m_contentHeightDirty = false;
1390
1395
        adjustMinYExtent();
1391
 
        if (contentHeight + m_minYExtent < height()) {
1392
 
            // need this since in the previous call to adjustMinYExtent contentHeight is not set yet
1393
 
            m_minYExtent = 0;
1394
 
        }
1395
1396
        m_inContentHeightKeepHeaderShown = m_headerItem && m_headerItem->y() == contentY();
1396
1397
        setContentHeight(contentHeight);
1397
1398
        m_inContentHeightKeepHeaderShown = false;