diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-06-23 06:50:48 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-06-23 06:50:48 (GMT) |
commit | faebec95f12f2db4cc105738c064e12bd0bcf988 (patch) | |
tree | 657af496dbc4fca94b88bcda05ecf4ad0b5ead15 /src/declarative/graphicsitems/qdeclarativepainteditem.cpp | |
parent | 73a3cd8f4448bb6ffcdb2076dcba2afa7a0e893b (diff) | |
download | Qt-faebec95f12f2db4cc105738c064e12bd0bcf988.zip Qt-faebec95f12f2db4cc105738c064e12bd0bcf988.tar.gz Qt-faebec95f12f2db4cc105738c064e12bd0bcf988.tar.bz2 |
Fix and better test Text / TextEdit alignments.
Various clipping and refresh bugs.
Task-number: QTBUG-11492
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepainteditem.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepainteditem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp index 13d1b61..3b9b8df 100644 --- a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp +++ b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp @@ -151,6 +151,7 @@ void QDeclarativePaintedItem::setContentsSize(const QSize &size) { Q_D(QDeclarativePaintedItem); if (d->contentsSize == size) return; + prepareGeometryChange(); d->contentsSize = size; clearCache(); update(); @@ -247,8 +248,7 @@ QRectF QDeclarativePaintedItem::boundingRect() const void QDeclarativePaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { Q_D(QDeclarativePaintedItem); - const QRect content(0,0,qCeil(d->contentsSize.width()*d->contentsScale), - qCeil(d->contentsSize.height()*d->contentsScale)); + const QRect content = boundingRect().toRect(); if (content.width() <= 0 || content.height() <= 0) return; |