From b793cbe460e311b3ed118b02635165db853696c4 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 14 Jun 2015 21:22:43 +0200 Subject: GroupBox/Frame/ToolBar: use positioners as content item Change-Id: I8f883dd0fd06172032dd78ff60437c906c2fe8dd Reviewed-by: J-P Nurmi --- src/imports/controls/GroupBox.qml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/imports/controls/GroupBox.qml') diff --git a/src/imports/controls/GroupBox.qml b/src/imports/controls/GroupBox.qml index 78eb4393..e3068014 100644 --- a/src/imports/controls/GroupBox.qml +++ b/src/imports/controls/GroupBox.qml @@ -43,18 +43,16 @@ AbstractGroupBox { default property alias data: content.data implicitWidth: Math.max(background ? background.implicitWidth : 0, - contentWidth + leftPadding + rightPadding) + contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, - contentHeight + topPadding + bottomPadding) - - contentWidth: content.children.length === 1 ? content.children[0].implicitWidth : 0 - contentHeight: content.children.length === 1 ? content.children[0].implicitHeight : 0 + contentItem.implicitHeight + topPadding + bottomPadding) padding: Theme.padding topPadding: Theme.padding + (label && title ? label.implicitHeight + Theme.spacing : 0) - contentItem: Item { + contentItem: Column { id: content + spacing: control.Theme.spacing } label: Text { -- cgit v1.2.3