forked from qt-creator/qt-creator
QmlDesigner: Increase the bounding rectangle
Since we clip against the bounding rectangle we increase the size a bit. This ensures we do not get painting artefacts if something is 1 or 2 pixels off. Change-Id: I4d9c40dd25aaa4469b568df914a1290f21790271 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -86,7 +86,7 @@ void FormEditorItem::setup()
|
||||
|
||||
QRectF FormEditorItem::boundingRect() const
|
||||
{
|
||||
return m_boundingRect;
|
||||
return m_boundingRect.adjusted(-2, -2, 2, 2);
|
||||
}
|
||||
|
||||
QPainterPath FormEditorItem::shape() const
|
||||
@@ -338,7 +338,7 @@ void FormEditorItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *,
|
||||
if (isInStackedContainer)
|
||||
showPlaceHolder = qmlItemNode().instanceIsRenderPixmapNull() && isContentVisible();
|
||||
|
||||
painter->setClipRegion(m_boundingRect.toRect());
|
||||
painter->setClipRegion(boundingRect().toRect());
|
||||
painter->setClipping(true);
|
||||
|
||||
if (!hideCompletely) {
|
||||
|
||||
Reference in New Issue
Block a user