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.qml21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/imports/controls/material/Page.qml b/src/imports/controls/material/Page.qml
index 647d8f0f..6e09f44f 100644
--- a/src/imports/controls/material/Page.qml
+++ b/src/imports/controls/material/Page.qml
@@ -34,24 +34,21 @@
**
****************************************************************************/
-import QtQuick 2.11
-import QtQuick.Templates 2.4 as T
-import QtQuick.Controls.Material 2.4
+import QtQuick 2.12
+import QtQuick.Templates 2.5 as T
+import QtQuick.Controls.Material 2.5
T.Page {
id: control
- implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
contentWidth + leftPadding + rightPadding,
- header && header.visible ? header.implicitWidth : 0,
- footer && footer.visible ? footer.implicitWidth : 0)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ implicitHeaderWidth,
+ implicitFooterWidth)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
contentHeight + topPadding + bottomPadding
- + (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)
+ + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0)
+ + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0))
background: Rectangle {
color: control.Material.backgroundColor