aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/Dialog.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-24 16:03:39 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-10-26 11:35:57 +0000
commite09a8591990e5281929ca2a7bb180bb3a35556ba (patch)
tree1b0a88ff0a827266e62f312520553e42c12d288f /src/imports/controls/material/Dialog.qml
parent41ec11a8157b9f1cbbc75ab8f68a2e08d24280d9 (diff)
Popup: add spacing support for Dialogv5.8.0-beta1
This helps to get the dialog layout right (a separate follow-up commit), because we don't need to mess with the paddings of the header, content, and footer, based on their existence and visibility, but we can also adjust the spacing which gets automatically added between the building blocks when they exist and are visible. Change-Id: Ie8b587eeb9d0fb4a8f42baf957879d40bbd3385c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/Dialog.qml')
-rw-r--r--src/imports/controls/material/Dialog.qml5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/imports/controls/material/Dialog.qml b/src/imports/controls/material/Dialog.qml
index ddc80895..90cda45a 100644
--- a/src/imports/controls/material/Dialog.qml
+++ b/src/imports/controls/material/Dialog.qml
@@ -48,8 +48,9 @@ T.Dialog {
footer && footer.visible ? footer.implicitWidth : 0,
contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- (header && header.visible ? header.implicitHeight : 0) + (footer && footer.visible ? footer.implicitHeight : 0))
- + (contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0)
+ (header && header.visible ? header.implicitHeight + spacing : 0)
+ + (footer && footer.visible ? footer.implicitHeight + spacing : 0)
+ + (contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0))
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)