on xenial help sign in
Try to make LVWPH to behave consistently
5024acfAlbert Astals
plugins/Dash/listviewwithpageheader.cpp+1−1
@@ -530,7 +530,7 @@ void ListViewWithPageHeader::adjustHeader(qreal diff)
530 // (but the header was not shown by it's own position)
530 // (but the header was not shown by it's own position)
531 // or the header is partially shown and we are not doing a maximizeVisibleArea either
531 // or the header is partially shown and we are not doing a maximizeVisibleArea either
532 const bool scrolledUp = m_previousContentY > contentY();
532 const bool scrolledUp = m_previousContentY > contentY();
533− const bool notRebounding = contentY() + height() < contentHeight();
533+ const bool notRebounding = qRound(contentY() + height()) < qRound(contentHeight());
534 const bool notShownByItsOwn = contentY() + diff >= m_headerItem->y() + m_headerItem->height();
534 const bool notShownByItsOwn = contentY() + diff >= m_headerItem->y() + m_headerItem->height();
535 const bool maximizeVisibleAreaRunning = m_contentYAnimation->isRunning() && contentYAnimationType == ContentYAnimationMaximizeVisibleArea;
535 const bool maximizeVisibleAreaRunning = m_contentYAnimation->isRunning() && contentYAnimationType == ContentYAnimationMaximizeVisibleArea;
536
536
tests/qmltests/Dash/tst_GenericScopeView.qml+2−1
@@ -99,6 +99,7 @@ Item {
99 function scrollToEnd()
99 function scrollToEnd()
100 {
100 {
101 var categoryListView = findChild(genericScopeView, "categoryListView");
101 var categoryListView = findChild(genericScopeView, "categoryListView");
102+ waitForRendering(categoryListView);
102 while (!categoryListView.atYEnd) {
103 while (!categoryListView.atYEnd) {
103 mouseFlick(genericScopeView, genericScopeView.width/2, genericScopeView.height - units.gu(8),
104 mouseFlick(genericScopeView, genericScopeView.width/2, genericScopeView.height - units.gu(8),
104 genericScopeView.width/2, genericScopeView.y)
105 genericScopeView.width/2, genericScopeView.y)
@@ -478,7 +479,7 @@ Item {
478 verify(category1.expanded);
479 verify(category1.expanded);
479 tryCompare(category1, "height", category1.item.expandedHeight + seeAll1.height);
480 tryCompare(category1, "height", category1.item.expandedHeight + seeAll1.height);
480 tryCompareFunction(function() {
481 tryCompareFunction(function() {
481− return genericScopeView.categoryView.contentY + category1.y + category1.height + genericScopeView.categoryView.pageHeader.height
482+ return genericScopeView.categoryView.contentY + category1.y + category1.height
482 == genericScopeView.categoryView.contentHeight;}
483 == genericScopeView.categoryView.contentHeight;}
483 , true);
484 , true);
484 }
485 }