Fix BorderImage drawing when no borders are specified.
authorMartin Jones <martin.jones@nokia.com>
Mon, 24 Oct 2011 07:00:34 +0000 (17:00 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 24 Oct 2011 07:18:27 +0000 (09:18 +0200)
When no borders were specified the innerRect was calculated
based on the item size rather than the image size.

Change-Id: I764caca22aa8a0c6ed3babaad38a93764357cd00
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
src/declarative/items/qquickborderimage.cpp

index 92c1c6d..3f8e093 100644 (file)
@@ -579,7 +579,7 @@ QSGNode *QQuickBorderImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDat
                                   qMax(1, d->pix.width() - border->right() - border->left()),
                                   qMax(1, d->pix.height() - border->bottom() - border->top())));
     } else {
-        node->setInnerRect(QRectF(0, 0, width(), height()));
+        node->setInnerRect(QRectF(0, 0, d->pix.width(), d->pix.height()));
     }
     node->setRect(QRectF(0, 0, width(), height()));
     node->setFiltering(d->smooth ? QSGTexture::Linear : QSGTexture::Nearest);