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