draw the black block only is there is no svg background

svn path=/trunk/KDE/kdelibs/; revision=903932
This commit is contained in:
Marco Martin 2008-12-31 17:30:52 +00:00
parent 17bd4d2e99
commit 786bd0be2a

View File

@ -628,6 +628,7 @@ void SignalPlotter::drawWidget(QPainter *p, uint w, uint height, int horizontalS
(uint)d->backgroundPixmap.size().width() != w) {
// recreate on resize etc
d->backgroundPixmap = QPixmap(w, height);
d->backgroundPixmap.fill(Qt::transparent);
QPainter pCache(&d->backgroundPixmap);
pCache.setRenderHint(QPainter::Antialiasing, false);
pCache.setFont(d->font);
@ -689,10 +690,11 @@ void SignalPlotter::drawWidget(QPainter *p, uint w, uint height, int horizontalS
void SignalPlotter::drawBackground(QPainter *p, int w, int h)
{
p->fillRect(0, 0, w, h, d->backgroundColor);
if (d->svgBackground) {
d->svgBackground->resize(w, h);
d->svgBackground->paint(p, 0, 0);
} else {
p->fillRect(0, 0, w, h, d->backgroundColor);
}
}