summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-06-23 06:50:48 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-06-23 06:50:48 (GMT)
commitfaebec95f12f2db4cc105738c064e12bd0bcf988 (patch)
tree657af496dbc4fca94b88bcda05ecf4ad0b5ead15 /src/declarative/graphicsitems/qdeclarativepainteditem.cpp
parent73a3cd8f4448bb6ffcdb2076dcba2afa7a0e893b (diff)
downloadQt-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.cpp4
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;