turn off caching when we are rending the bar

BUG:185642

svn path=/trunk/KDE/kdelibs/; revision=967637
This commit is contained in:
Aaron J. Seigo 2009-05-13 16:40:51 +00:00
parent 7ac1ba7ee1
commit b967d0944e

View File

@ -165,8 +165,10 @@ public:
//be retrocompatible with themes for kde <= 4.1
if (image->hasElement("background-center")) {
QRectF elementRect = barRect();
if (elementRect.isEmpty())
if (elementRect.isEmpty()) {
return; // nothing to be done
}
QSize imageSize = image->size();
image->resize();
@ -185,6 +187,7 @@ public:
{
QRectF elementRect = barRect();
image->setUsingRenderingCache(false);
if (image->hasElement("hint-bar-stretch")) {
image->resizeFrame(elementRect.size());
image->paintFrame(p);
@ -208,6 +211,7 @@ public:
p->drawTiledPixmap(elementRect, image->framePixmap());
image->resize(imageSize);
}
image->setUsingRenderingCache(true);
}
void paintForeground(QPainter *p)
@ -481,6 +485,7 @@ void Meter::paint(QPainter *p,
if (d->maximum != d->minimum) {
percentage = (qreal)d->value / (d->maximum - d->minimum);
}
p->setRenderHint(QPainter::SmoothPixmapTransform);
switch (d->meterType) {
case BarMeterHorizontal:
@ -497,6 +502,7 @@ void Meter::paint(QPainter *p,
clipRect.moveBottom(bottom);
}
p->setClipRect(clipRect);
//be retrocompatible
if (d->image->hasElement("bar-active-center")) {
d->paintBar(p, "bar-active");