From 1d67e109bcb75271bfbe6ffaefac87cec19f1e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Tue, 23 Jun 2009 16:17:14 +0300 Subject: Draw white rect into canvas to distinguish the script graphic from theme background. --- examples/script/context2d/qcontext2dcanvas.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/script/context2d/qcontext2dcanvas.cpp b/examples/script/context2d/qcontext2dcanvas.cpp index 30bb3eb..c6772ce 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); } -- cgit v0.12