aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/universal/Frame.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-25 13:05:48 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-25 12:13:31 +0000
commit06d4931ede0a1b4422a52014b3bed7a4036d6bcc (patch)
tree05ea5d744898928460f6781754de8f0b5c07ce63 /src/imports/controls/universal/Frame.qml
parentd665c0faf4ac52a8aeed48ee8497b5d61becedc5 (diff)
Containers: use the implicit size of the contentItem
The result of: Frame { ColumnLayout { RadioButton { text: "First" } RadioButton { text: "Second" } RadioButton { text: "Third" } } } is now identical to: Frame { contentItem: ColumnLayout { RadioButton { text: "First" } RadioButton { text: "Second" } RadioButton { text: "Third" } } } Change-Id: I823b2259dabb66db0dddef41ea396f7ac1000a82 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/universal/Frame.qml')
-rw-r--r--src/imports/controls/universal/Frame.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/controls/universal/Frame.qml b/src/imports/controls/universal/Frame.qml
index 47e9e389..9427dc2f 100644
--- a/src/imports/controls/universal/Frame.qml
+++ b/src/imports/controls/universal/Frame.qml
@@ -44,8 +44,8 @@ T.Frame {
implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
- contentWidth: contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0
- contentHeight: contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
padding: 12