forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user