aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/Page.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/material/Page.qml')
-rw-r--r--src/imports/controls/material/Page.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/imports/controls/material/Page.qml b/src/imports/controls/material/Page.qml
index ec343d04..707d471e 100644
--- a/src/imports/controls/material/Page.qml
+++ b/src/imports/controls/material/Page.qml
@@ -41,6 +41,18 @@ import QtQuick.Controls.Material 2.1
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)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight + topPadding + bottomPadding
+ + (header && header.visible ? header.implicitHeight : 0)
+ + (footer && footer.visible ? footer.implicitHeight : 0))
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
background: Rectangle {
color: control.Material.backgroundColor
}