summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-11-09 02:40:48 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-11-09 02:40:48 (GMT)
commit9b24932eba2b204852c4f2b35e05bd7d9d47ccea (patch)
treebe19abcd8e9cdddd978753302921151af5026ab7 /src/declarative
parent6330e20da815890a5282dbe7ce9c2363e4b4c3b4 (diff)
downloadQt-9b24932eba2b204852c4f2b35e05bd7d9d47ccea.zip
Qt-9b24932eba2b204852c4f2b35e05bd7d9d47ccea.tar.gz
Qt-9b24932eba2b204852c4f2b35e05bd7d9d47ccea.tar.bz2
Fix Rectangle painting at small sizes.
We require a minimum size of 5x5 for the border image caching to work. Task-number: QTBUG-15135 Reviewed-by: Michael Brasser
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 1ffd3bd..fc3954f 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -477,7 +477,8 @@ void QDeclarativeRectangle::drawRect(QPainter &p)
{
Q_D(QDeclarativeRectangle);
if ((d->gradient && d->gradient->gradient())
- || d->radius > width()/2 || d->radius > height()/2) {
+ || d->radius > width()/2 || d->radius > height()/2
+ || width() < 3 || height() < 3) {
// XXX This path is still slower than the image path
// Image path won't work for gradients or invalid radius though
bool oldAA = p.testRenderHint(QPainter::Antialiasing);