[apps/statistics] Avoid blinking in histogram view

Change-Id: Ia50ef402a381205ded2fc956e7d345853d4654e1
This commit is contained in:
Émilie Feral
2017-06-08 15:14:57 +02:00
parent 55d2df2f89
commit c7c37ac7b1
3 changed files with 5 additions and 3 deletions

View File

@@ -19,8 +19,10 @@ void HistogramView::reload() {
CurveView::reload();
float pixelLowerBound = floatToPixel(Axis::Horizontal, m_highlightedBarStart)-2;
float pixelUpperBound = floatToPixel(Axis::Horizontal, m_highlightedBarEnd)+2;
/* We deliberately do not mark as dirty the frame of the banner view to avoid
*unpleasant blinking of the drawing of the banner view. */
KDRect dirtyZone(KDRect(pixelLowerBound, 0, pixelUpperBound-pixelLowerBound,
bounds().height()));
bounds().height()-m_bannerView->bounds().height()));
markRectAsDirty(dirtyZone);
}