diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-02-08 07:27:54 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-02-08 07:27:54 (GMT) |
commit | 16684c81e962776b6eb078219e43fd6ec0aa2dbb (patch) | |
tree | 846995c44ca3db4323494ae0c687d3a5a2b3a879 /src/declarative/graphicsitems | |
parent | d4b1468b323b2ded430243e66da63523193de9ce (diff) | |
download | Qt-16684c81e962776b6eb078219e43fd6ec0aa2dbb.zip Qt-16684c81e962776b6eb078219e43fd6ec0aa2dbb.tar.gz Qt-16684c81e962776b6eb078219e43fd6ec0aa2dbb.tar.bz2 |
Fix viewport size update.
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicslistview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp index 26be7d8..a7a37e5 100644 --- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp @@ -448,9 +448,11 @@ public: void updateViewport() { Q_Q(QmlGraphicsListView); if (orient == QmlGraphicsListView::Vertical) { - q->setViewportHeight(q->minYExtent() - q->maxYExtent()); + qreal vpHeight = -q->maxYExtent() + q->minYExtent() + q->height(); + q->setViewportHeight(vpHeight); } else { - q->setViewportWidth(q->minXExtent() - q->maxXExtent()); + qreal vpWidth = -q->maxXExtent() + q->minXExtent() + q->width(); + q->setViewportWidth(qMin(vpWidth, q->width())); } } |