aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/GroupBox.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-06-18 14:35:54 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-06-18 12:37:31 +0000
commitc803830c02fb573582cd848185460ba65b4529e5 (patch)
treebc0e00a8c82b4242661d3d6f7beb77e3c5691623 /src/imports/controls/GroupBox.qml
parent9b67ed1dde437448b927ef839ca60a2820f021dc (diff)
Frame, GroupBox, ToolBar: restore contentWidth & contentHeight
Change-Id: I79a974c64f6ec57ebfa83cea0857b2a1590af61f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/GroupBox.qml')
-rw-r--r--src/imports/controls/GroupBox.qml12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/imports/controls/GroupBox.qml b/src/imports/controls/GroupBox.qml
index e3068014..a0af61da 100644
--- a/src/imports/controls/GroupBox.qml
+++ b/src/imports/controls/GroupBox.qml
@@ -42,17 +42,17 @@ AbstractGroupBox {
default property alias data: content.data
- implicitWidth: Math.max(background ? background.implicitWidth : 0,
- contentItem.implicitWidth + leftPadding + rightPadding)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
- contentItem.implicitHeight + topPadding + bottomPadding)
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.children.length === 1 ? contentItem.children[0].implicitWidth : 0
+ contentHeight: contentItem.children.length === 1 ? contentItem.children[0].implicitHeight : 0
padding: Theme.padding
topPadding: Theme.padding + (label && title ? label.implicitHeight + Theme.spacing : 0)
- contentItem: Column {
+ contentItem: Item {
id: content
- spacing: control.Theme.spacing
}
label: Text {