diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-08 20:50:21 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-09 06:58:48 +0000 |
commit | 1b1df43976444d11519467d84891ee3ffe6fbaec (patch) | |
tree | 8bd5869de318943ef03096f0023e2afe9ccee304 /src/quicktemplates2/qquickpage.cpp | |
parent | 0764003773e3db3ffdd76021f1a17359cb52452c (diff) |
Page: take header & footer visibility into account in relayout()
Task-number: QTBUG-55143
Change-Id: I4176d0f8902ee417fd5cb938b0f0902d480e80f6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickpage.cpp')
-rw-r--r-- | src/quicktemplates2/qquickpage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickpage.cpp b/src/quicktemplates2/qquickpage.cpp index dd9bcc21..5c2c5b42 100644 --- a/src/quicktemplates2/qquickpage.cpp +++ b/src/quicktemplates2/qquickpage.cpp @@ -112,8 +112,8 @@ void QQuickPagePrivate::relayout() { Q_Q(QQuickPage); QQuickItem *content = q->contentItem(); - const qreal hh = header ? header->height() : 0; - const qreal fh = footer ? footer->height() : 0; + const qreal hh = header && header->isVisible() ? header->height() : 0; + const qreal fh = footer && footer->isVisible() ? footer->height() : 0; content->setY(hh + q->topPadding()); content->setX(q->leftPadding()); |