From c0232099a9fac03ef0f5287b6a26dbbd46669c06 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 17 Apr 2018 14:43:11 +0200 Subject: Page: fix implicitWidth bindings Don't add paddings to header and footer width when choosing the max. Padding affects content, not headers and footers. Change-Id: I92381762f97eab384b18510522bf788abecd8338 Reviewed-by: Mitch Curtis --- src/imports/controls/material/Page.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/imports/controls/material/Page.qml') diff --git a/src/imports/controls/material/Page.qml b/src/imports/controls/material/Page.qml index 9993aa0f..647d8f0f 100644 --- a/src/imports/controls/material/Page.qml +++ b/src/imports/controls/material/Page.qml @@ -42,9 +42,9 @@ T.Page { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, - Math.max(contentWidth, - header && header.visible ? header.implicitWidth : 0, - footer && footer.visible ? footer.implicitWidth : 0) + leftPadding + rightPadding) + contentWidth + leftPadding + rightPadding, + header && header.visible ? header.implicitWidth : 0, + footer && footer.visible ? footer.implicitWidth : 0) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding + (header && header.visible ? header.implicitHeight + spacing : 0) -- cgit v1.2.3