diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-04-19 03:30:23 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-04-19 03:30:23 (GMT) |
commit | 2075925adaa1a1c78b6da9dc10d2b1a165178363 (patch) | |
tree | ff05d21affcfb44a5c557cc4587cdb0117bf40f2 /src/declarative/graphicsitems/qdeclarativerectangle.cpp | |
parent | a8188c22ad67b339c1c68b39da0064473fec8171 (diff) | |
download | Qt-2075925adaa1a1c78b6da9dc10d2b1a165178363.zip Qt-2075925adaa1a1c78b6da9dc10d2b1a165178363.tar.gz Qt-2075925adaa1a1c78b6da9dc10d2b1a165178363.tar.bz2 |
Add some padding to Rectangles with border to avoid qDrawBorderPixmap() bug.
Task-number: QTBUG-5689
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativerectangle.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativerectangle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index 0328f91..3daa83f 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -357,7 +357,9 @@ void QDeclarativeRectangle::generateBorderedRect() Q_D(QDeclarativeRectangle); if (d->rectImage.isNull()) { const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0; - d->rectImage = QPixmap(pw*2 + 3, pw*2 + 3); + // Adding 5 here makes qDrawBorderPixmap() paint correctly with smooth: true + // Ideally qDrawBorderPixmap() would be fixed - QTBUG-7999 + d->rectImage = QPixmap(pw*2 + 5, pw*2 + 5); d->rectImage.fill(Qt::transparent); QPainter p(&(d->rectImage)); p.setRenderHint(QPainter::Antialiasing); |