cull the header item when not on view to save some painting
commita5ac758d9dd55448bb01a1790c53bd7c1edcac05
authorAlbert Astals Cid <albert.astals@canonical.com>
dateMon 30 May 2016, 14:44 (10 years ago)
parent64d3f31
plugins/Dash/listviewwithpageheader.cpp+4
@@ -1335,6 +1335,10 @@ void ListViewWithPageHeader::layout()
13351335 }
13361336 }
13371337 }
1338+ if (m_headerItem) {
1339+ const bool cullHeader = m_headerItem->y() + m_headerItem->height() < contentY();
1340+ QQuickItemPrivate::get(m_headerItem)->setCulled(cullHeader);
1341+ }
13381342 m_inLayout = false;
13391343}
13401344