diff --git a/apps/shared/curve_view.cpp b/apps/shared/curve_view.cpp index b7eb0a158..7312dbced 100644 --- a/apps/shared/curve_view.cpp +++ b/apps/shared/curve_view.cpp @@ -12,9 +12,9 @@ namespace Shared { CurveView::CurveView(CurveViewRange * curveViewRange, CurveViewCursor * curveViewCursor, BannerView * bannerView, View * cursorView, View * okView) : View(), + m_bannerView(bannerView), m_curveViewRange(curveViewRange), m_curveViewCursor(curveViewCursor), - m_bannerView(bannerView), m_cursorView(cursorView), m_okView(okView), m_mainViewSelected(false), diff --git a/apps/shared/curve_view.h b/apps/shared/curve_view.h index 2cf80eeb2..1e03d6233 100644 --- a/apps/shared/curve_view.h +++ b/apps/shared/curve_view.h @@ -55,6 +55,7 @@ protected: void computeLabels(Axis axis); void drawLabels(KDContext * ctx, KDRect rect, Axis axis, bool shiftOrigin) const; virtual KDSize cursorSize(); + BannerView * m_bannerView; private: /* The window bounds are deduced from the model bounds but also take into account a margin (computed with k_marginFactor) */ @@ -81,7 +82,6 @@ private: * cursor views may be nullptr if not needed. */ CurveViewRange * m_curveViewRange; CurveViewCursor * m_curveViewCursor; - BannerView * m_bannerView; View * m_cursorView; View * m_okView; bool m_mainViewSelected; diff --git a/apps/statistics/histogram_view.cpp b/apps/statistics/histogram_view.cpp index e001c84d5..d5f89bc5a 100644 --- a/apps/statistics/histogram_view.cpp +++ b/apps/statistics/histogram_view.cpp @@ -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); }