summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index ccabbde..d098aa0 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -380,7 +380,9 @@ void QDeclarativeRectangle::generateBorderedRect()
key += d->pen->color().name() % QString::number(d->pen->color().alpha(), 16);
if (!QPixmapCache::find(key, &d->rectImage)) {
- d->rectImage = QPixmap(pw*2 + 3, pw*2 + 3);
+ // Adding 5 here makes qDrawBorderPixmap() paint correctly with smooth: true
+ // See QTBUG-7999 and QTBUG-10765 for more details.
+ d->rectImage = QPixmap(pw*2 + 5, pw*2 + 5);
d->rectImage.fill(Qt::transparent);
QPainter p(&(d->rectImage));
p.setRenderHint(QPainter::Antialiasing);