summaryrefslogtreecommitdiffstats
path: root/examples/script/context2d/qcontext2dcanvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/script/context2d/qcontext2dcanvas.cpp')
-rw-r--r--examples/script/context2d/qcontext2dcanvas.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/script/context2d/qcontext2dcanvas.cpp b/examples/script/context2d/qcontext2dcanvas.cpp
index 5e97242..f735908 100644
--- a/examples/script/context2d/qcontext2dcanvas.cpp
+++ b/examples/script/context2d/qcontext2dcanvas.cpp
@@ -85,6 +85,11 @@ void QContext2DCanvas::contentsChanged(const QImage &image)
void QContext2DCanvas::paintEvent(QPaintEvent *e)
{
QPainter p(this);
+#ifdef Q_WS_S60
+// Draw white rect first since in with some themes the js-file content will produce black-on-black.
+ QBrush whiteBgBrush(Qt::white);
+ p.fillRect(e->rect(), whiteBgBrush);
+#endif
p.setClipRect(e->rect());
p.drawImage(0, 0, m_image);
}