diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2017-12-12 17:12:56 +0100 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2017-12-13 07:39:30 +0000 |
commit | c9d2453a4df347f0500340d7e21cd9219b1d5549 (patch) | |
tree | 828dae40d2de8b441db72991240c42b811b843ec | |
parent | 1d2049bffc5471901f7d1252b9bad946e49912d1 (diff) |
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>
-rw-r--r-- | src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp index 54d5d1536d..d6bd69ed2c 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp @@ -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) { |