aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/Page.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-24 17:38:06 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-10-26 10:13:22 +0000
commit935daea1cdd9247d04618fcd67eb2a935060d1db (patch)
treedf16bd763fc6f7ae8938d0fd1f70fdb35da3da0d /src/imports/controls/Page.qml
parent25d6d137a90ca9e3ce654adcc454c23de4622a49 (diff)
Page: support spacing
Add spacing support into QQuickPageLayout. Having spacing and padding separately gives more fine-grained control over the layout. Spacing is inserted between the header, content, and footer, but only when the respective building blocks are visible. Change-Id: Ia26a4c33c2756a603ca6d53aefac3a66414b36d3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/Page.qml')
-rw-r--r--src/imports/controls/Page.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/controls/Page.qml b/src/imports/controls/Page.qml
index fbed527f..edd8d628 100644
--- a/src/imports/controls/Page.qml
+++ b/src/imports/controls/Page.qml
@@ -48,8 +48,8 @@ T.Page {
footer && footer.visible ? footer.implicitWidth : 0) + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentHeight + topPadding + bottomPadding
- + (header && header.visible ? header.implicitHeight : 0)
- + (footer && footer.visible ? footer.implicitHeight : 0))
+ + (header && header.visible ? header.implicitHeight + spacing : 0)
+ + (footer && footer.visible ? footer.implicitHeight + spacing : 0))
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)