aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2011-07-28 17:44:07 +1000
committerQt by Nokia <qt-info@nokia.com>2011-07-28 10:04:08 +0200
commitc4a443c1a3e534ad74ea3a656901e5b554e59635 (patch)
treede13e108d2bdc94d2ec05a58e04ba403b30560fb /src
parentc57a9238e94942d883f79de8d1ac277092903790 (diff)
BorderImage inner rect should have a positive size
Task-number: QTBUG-19527 Change-Id: I7cba15cc8ca4679d92f2e456ed95629702ea27a1 Reviewed-on: http://codereview.qt.nokia.com/2322 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/qsgborderimage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/items/qsgborderimage.cpp b/src/declarative/items/qsgborderimage.cpp
index e7b10cb697..e4cb535bcd 100644
--- a/src/declarative/items/qsgborderimage.cpp
+++ b/src/declarative/items/qsgborderimage.cpp
@@ -339,8 +339,8 @@ QSGNode *QSGBorderImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *
const QSGScaleGrid *border = d->getScaleGrid();
node->setInnerRect(QRectF(border->left(),
border->top(),
- d->pix.width() - border->right() - border->left(),
- d->pix.height() - border->bottom() - border->top()));
+ qMax(1, d->pix.width() - border->right() - border->left()),
+ qMax(1, d->pix.height() - border->bottom() - border->top())));
node->setRect(QRectF(0, 0, width(), height()));
node->setFiltering(d->smooth ? QSGTexture::Linear : QSGTexture::Nearest);
node->setHorzontalTileMode(d->horizontalTileMode);