diff options
Diffstat (limited to 'src/imports/layouts/qquickstacklayout.cpp')
-rw-r--r-- | src/imports/layouts/qquickstacklayout.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/imports/layouts/qquickstacklayout.cpp b/src/imports/layouts/qquickstacklayout.cpp index a223dd0374..0bfe63816d 100644 --- a/src/imports/layouts/qquickstacklayout.cpp +++ b/src/imports/layouts/qquickstacklayout.cpp @@ -307,7 +307,11 @@ void QQuickStackLayout::rearrange(const QSizeF &newSize) QQuickItem *item = itemAt(d->currentIndex); Q_ASSERT(item); item->setPosition(QPointF(0,0)); // ### respect alignment? - item->setSize(newSize.expandedTo(hints.min()).boundedTo(hints.max())); + const QSizeF oldSize(item->width(), item->height()); + const QSizeF effectiveNewSize = newSize.expandedTo(hints.min()).boundedTo(hints.max()); + item->setSize(effectiveNewSize); + if (effectiveNewSize == oldSize) + item->polish(); QQuickLayout::rearrange(newSize); } |