From: Martin Jones Date: Mon, 24 Oct 2011 07:00:34 +0000 (+1000) Subject: Fix BorderImage drawing when no borders are specified. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=83529b68eb8e4d1959b7cc85868ff6ac5ef8d58d;p=konrad%2Fqtdeclarative.git Fix BorderImage drawing when no borders are specified. 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 --- diff --git a/src/declarative/items/qquickborderimage.cpp b/src/declarative/items/qquickborderimage.cpp index 92c1c6d..3f8e093 100644 --- a/src/declarative/items/qquickborderimage.cpp +++ b/src/declarative/items/qquickborderimage.cpp @@ -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);