summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-10 16:17:44 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-11-10 16:24:56 (GMT)
commit6e6803540d50f14a2c4a6e1ee551310fa96d0cb6 (patch)
treec080aa1b77a77ddc2aef26a4041e5e5e730583bb
parent642b0f063df1339bcef6e8f23d84536230131573 (diff)
downloadQt-6e6803540d50f14a2c4a6e1ee551310fa96d0cb6.zip
Qt-6e6803540d50f14a2c4a6e1ee551310fa96d0cb6.tar.gz
Qt-6e6803540d50f14a2c4a6e1ee551310fa96d0cb6.tar.bz2
Fixed: Stylesheet and background image issue in ScrollArea
When using background-image and background-attachement: scroll and background-repeat: no-repeat The rectangle used to draw the image was not correctly computed. Reviewed-by: Thierry Task-number: QTBUG-3783
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index ce73fd8..59210c3 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -1180,7 +1180,7 @@ void QRenderRule::drawBackgroundImage(QPainter *p, const QRect &rect, QPoint off
QRect r = originRect(rect, background()->origin);
QRect aligned = QStyle::alignedRect(Qt::LeftToRight, background()->position, bgp.size(), r);
- QRect inter = aligned.intersected(r);
+ QRect inter = aligned.translated(-off).intersected(r);
switch (background()->repeat) {
case Repeat_Y: