diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2017-03-16 17:12:37 +0100 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2017-03-17 13:02:54 +0000 |
commit | fdb40645a4d1c137e82a33353687ac9667aa14bc (patch) | |
tree | 44ad3eda42f50d3bbe38f274c73d2402f81bed48 /share/qtcreator/qml/qmlpuppet | |
parent | d9a66a5406a760d5fc04e8396ab283c923f0b9fa (diff) |
QmlDesigner: Unite the bounding rectangle with actual size
This is required to correctly render text elements with padding,
since the bounding rect seems incorrect.
Change-Id: Ifcef2607089a7a2cec071814d5d87bd27da7ace3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp index 4141f6b725..b71c24ce9b 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp @@ -473,6 +473,8 @@ QRectF QuickItemNodeInstance::boundingRectWithStepChilds(QQuickItem *parentItem) { QRectF boundingRect = parentItem->boundingRect(); + boundingRect = boundingRect.united(QRectF(QPointF(0, 0), size())); + foreach (QQuickItem *childItem, parentItem->childItems()) { if (!nodeInstanceServer()->hasInstanceForObject(childItem)) { QRectF transformedRect = childItem->mapRectToItem(parentItem, boundingRectWithStepChilds(childItem)); |