aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickflickable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquickflickable.cpp')
-rw-r--r--src/quick/items/qquickflickable.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 75d509129b..f77c427ccf 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -882,8 +882,10 @@ QQuickItem *QQuickFlickable::contentItem()
QQuickFlickableVisibleArea *QQuickFlickable::visibleArea()
{
Q_D(QQuickFlickable);
- if (!d->visibleArea)
+ if (!d->visibleArea) {
d->visibleArea = new QQuickFlickableVisibleArea(this);
+ d->visibleArea->updateVisible(); // calculate initial ratios
+ }
return d->visibleArea;
}
@@ -1519,8 +1521,7 @@ void QQuickFlickable::geometryChanged(const QRectF &newGeometry,
bool changed = false;
if (newGeometry.width() != oldGeometry.width()) {
- if (xflick())
- changed = true;
+ changed = true; // we must update visualArea.widthRatio
if (d->hData.viewSize < 0) {
d->contentItem->setWidth(width());
emit contentWidthChanged();
@@ -1532,8 +1533,7 @@ void QQuickFlickable::geometryChanged(const QRectF &newGeometry,
}
}
if (newGeometry.height() != oldGeometry.height()) {
- if (yflick())
- changed = true;
+ changed = true; // we must update visualArea.heightRatio
if (d->vData.viewSize < 0) {
d->contentItem->setHeight(height());
emit contentHeightChanged();