aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/ToolBar.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/ToolBar.qml')
-rw-r--r--src/imports/controls/ToolBar.qml12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/imports/controls/ToolBar.qml b/src/imports/controls/ToolBar.qml
index 7677607d..e2bf8eac 100644
--- a/src/imports/controls/ToolBar.qml
+++ b/src/imports/controls/ToolBar.qml
@@ -42,16 +42,16 @@ AbstractToolBar {
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
Accessible.role: Accessible.ToolBar
- contentItem: Row {
+ contentItem: Item {
id: content
- spacing: control.Theme.spacing
}
background: Rectangle {