aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-06-14 21:22:43 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-06-15 08:05:54 +0000
commitb793cbe460e311b3ed118b02635165db853696c4 (patch)
treee00699aefeadf62e9cbc65004a84174ba8f92dc9 /src/imports
parentd2b13164d85fffc7d379304ca5aefc9304e53a8a (diff)
GroupBox/Frame/ToolBar: use positioners as content item
Change-Id: I8f883dd0fd06172032dd78ff60437c906c2fe8dd Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/controls/Frame.qml10
-rw-r--r--src/imports/controls/GroupBox.qml10
-rw-r--r--src/imports/controls/ToolBar.qml10
3 files changed, 12 insertions, 18 deletions
diff --git a/src/imports/controls/Frame.qml b/src/imports/controls/Frame.qml
index c1c2ea62..849b8e62 100644
--- a/src/imports/controls/Frame.qml
+++ b/src/imports/controls/Frame.qml
@@ -43,17 +43,15 @@ AbstractFrame {
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
- contentItem: Item {
+ contentItem: Column {
id: content
+ spacing: control.Theme.spacing
}
frame: Rectangle {
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 {
diff --git a/src/imports/controls/ToolBar.qml b/src/imports/controls/ToolBar.qml
index 43666db2..7677607d 100644
--- a/src/imports/controls/ToolBar.qml
+++ b/src/imports/controls/ToolBar.qml
@@ -43,17 +43,15 @@ AbstractToolBar {
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)
Accessible.role: Accessible.ToolBar
- contentItem: Item {
+ contentItem: Row {
id: content
+ spacing: control.Theme.spacing
}
background: Rectangle {