diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-10 17:17:44 +0100 |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-10 17:24:56 +0100 |
commit | 6e6803540d50f14a2c4a6e1ee551310fa96d0cb6 (patch) | |
tree | c080aa1b77a77ddc2aef26a4041e5e5e730583bb /src/gui/styles/qstylesheetstyle.cpp | |
parent | 642b0f063df1339bcef6e8f23d84536230131573 (diff) | |
download | qt4-tools-6e6803540d50f14a2c4a6e1ee551310fa96d0cb6.tar.gz |
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
Diffstat (limited to 'src/gui/styles/qstylesheetstyle.cpp')
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index ce73fd8db3..59210c3a95 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: |