Don't cache toolbars twice. Fix flickering.

There was a flicker problem with the tool bars because of
missing information in the cache key. We added this info
and removed the redundant caching of toolbar gradients.

Done-with: thorbjorn
This commit is contained in:
Jens Bache-Wiig
2010-03-19 17:47:45 +01:00
parent 751d7d043c
commit 3da48de31b
3 changed files with 14 additions and 36 deletions

View File

@@ -231,9 +231,9 @@ void StyleHelper::horizontalGradient(QPainter *painter, const QRect &spanRect, c
if (StyleHelper::usePixmapCache()) {
QString key;
QColor keyColor = baseColor(lightColored);
key.sprintf("mh_horizontal %d %d %d %d %d",
key.sprintf("mh_horizontal %d %d %d %d %d %d",
spanRect.width(), spanRect.height(), clipRect.width(),
clipRect.height(), keyColor.rgb());
clipRect.height(), keyColor.rgb(), spanRect.x());
QPixmap pixmap;
if (!QPixmapCache::find(key, pixmap)) {