diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-09 23:00:20 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-09 23:00:20 (GMT) |
commit | 5d0de8d013c84b9a75646e48038424e23e588ef5 (patch) | |
tree | 5af635df23e41110e4c822191f637b5b0f046f76 | |
parent | ad68c845e3e368dc4235e64b54e15a9ee886b078 (diff) | |
parent | 460d52bfa85318610576d1ab75eae4799865e064 (diff) | |
download | Qt-5d0de8d013c84b9a75646e48038424e23e588ef5.zip Qt-5d0de8d013c84b9a75646e48038424e23e588ef5.tar.gz Qt-5d0de8d013c84b9a75646e48038424e23e588ef5.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-water
-rw-r--r-- | src/gui/widgets/qlabel.cpp | 2 | ||||
-rw-r--r-- | src/openvg/qpaintengine_vg.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp index 42be03b..011b07a 100644 --- a/src/gui/widgets/qlabel.cpp +++ b/src/gui/widgets/qlabel.cpp @@ -682,7 +682,7 @@ QSize QLabelPrivate::sizeForWidth(int w) const bool tryWidth = (w < 0) && (align & Qt::TextWordWrap); if (tryWidth) - w = fm.averageCharWidth() * 80; + w = qMin(fm.averageCharWidth() * 80, q->maximumSize().width()); else if (w < 0) w = 2000; w -= (hextra + contentsMargin.width()); diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index b8e8bad..13156d7 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -3210,8 +3210,7 @@ void QVGPaintEngine::drawTiledPixmap (const QRectF &r, const QPixmap &pixmap, const QPointF &s) { QBrush brush(state()->pen.color(), pixmap); - QTransform xform; - xform.translate(-s.x(), -s.y()); + QTransform xform = QTransform::fromTranslate(r.x() - s.x(), r.y() - s.y()); brush.setTransform(xform); fillRect(r, brush); } |