Make the cache count row lie less.

The height of the events there didn't correspond to the actual cache
fill state.

Change-Id: I8d0415d4ec4e9e97fb1821bb8c0f5b536e21abd4
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-03-21 13:28:54 +01:00
parent 03c3241306
commit fbfde55dc2

View File

@@ -98,16 +98,9 @@ QColor PixmapCacheModel::getColor(int index) const
float PixmapCacheModel::getHeight(int index) const
{
Q_D(const PixmapCacheModel);
if (d->range(index).pixmapEventType == PixmapCacheCountChanged) {
float scale = d->maxCacheSize - d->minCacheSize;
float fraction = 1.0f;
if (scale > 1)
fraction = (float)(d->range(index).cacheSize -
d->minCacheSize) / scale;
return fraction * 0.85f + 0.15f;
}
if (d->range(index).pixmapEventType == PixmapCacheCountChanged)
return 0.15 + (float)d->range(index).cacheSize * 0.85 / (float)d->maxCacheSize;
else
return 1.0f;
}