on xenial help sign in
Fight against zeros not being zeros
commitaabfc419b4e48058dc6ef110fd40b0fef07b20c5 authorAlbert Astals <albert.astals@canonical.com> dateFri 14 Mar 2014, 13:36 (13 years ago) parent95533c4
1 file changed+6−1
plugins/DashViews/listviewwithpageheader.cpp+6−1
plugins/DashViews/listviewwithpageheader.cpp+6−1
@@ -1141,7 +1141,12 @@ void ListViewWithPageHeader::adjustMinYExtent()
11411141 nonCreatedHeight = m_firstVisibleIndex * visibleItemsHeight / visibleItems;
11421142// qDebug() << m_firstVisibleIndex << visibleItemsHeight << visibleItems << nonCreatedHeight;
11431143 }
1144− m_minYExtent = nonCreatedHeight - m_visibleItems.first()->y() - m_clipItem->y() + (m_headerItem ? m_headerItem->implicitHeight() : 0);
1144+ const qreal headerHeight = (m_headerItem ? m_headerItem->implicitHeight() : 0);
1145+ m_minYExtent = nonCreatedHeight - m_visibleItems.first()->y() - m_clipItem->y() + headerHeight;
1146+ if (m_minYExtent != 0 && qFuzzyIsNull(m_minYExtent)) {
1147+ m_minYExtent = 0;
1148+ m_visibleItems.first()->setY(nonCreatedHeight - m_clipItem->y() + headerHeight);
1149+ }
11451150 }
11461151}
11471152