summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-04-24 14:13:56 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-04-28 14:40:57 (GMT)
commit76d46a2deedc69108cefce811e8dc6a65f9151e6 (patch)
treefe730eefe7a9d49bd5399563385ac4ef22d3e9f4 /src/gui/kernel
parent27e57ccd327fbc1edbb23d9959c5388023974dfc (diff)
downloadQt-76d46a2deedc69108cefce811e8dc6a65f9151e6.zip
Qt-76d46a2deedc69108cefce811e8dc6a65f9151e6.tar.gz
Qt-76d46a2deedc69108cefce811e8dc6a65f9151e6.tar.bz2
Fix background painting.
This is a reverted patch that has been rebased on to another branch and then caused conflicts so it might contain an error or two. Basically we need to store the background texture from the style into the palette so that it can be replaced by applications that don't want it.
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 7eaebbb..9015182 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -2038,19 +2038,17 @@ static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QPoin
// Defined in qmacstyle_mac.cpp
extern void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QPoint &offset, const QBrush &brush);
qt_mac_fill_background(painter, rgn, offset, brush);
+#elif defined(Q_WS_S60)
+ // Defined in qs60style_symbian.cpp
+ extern void qt_s60_fill_background(QPainter *painter, const QRegion &rgn,
+ const QPoint &offset, const QBrush &brush);
+ qt_s60_fill_background(painter, rgn, offset, brush);
#else
const QRegion translated = rgn.translated(offset);
const QRect rect(translated.boundingRect());
painter->setClipRegion(translated);
painter->drawTiledPixmap(rect, brush.texture(), rect.topLeft());
#endif
-#if defined(Q_WS_S60) && !defined(QT_NO_STYLE_S60)
- } if (!brush.isOpaque()) {
- // QS60Style knows it's background and does not store its texture in a palette
- // Defined in qs60style.cpp
- extern void qt_s60_fill_background(QPainter *painter, const QRegion &rgn, const QPoint &offset);
- qt_s60_fill_background(painter, rgn, offset);
-#endif
} else {
const QVector<QRect> &rects = rgn.rects();
for (int i = 0; i < rects.size(); ++i)