From: Joel Holdsworth Date: Wed, 26 Apr 2017 16:13:08 +0000 (-0600) Subject: Trace: Fixed background rectangle X-Git-Tag: pulseview-0.4.0~96 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=857ebbef1c10cdc02df03af1fb446c704809394e;p=pulseview.git Trace: Fixed background rectangle It previously ignored the left x-coordinate, and left a 1-pixel gap at the right-hand side. --- diff --git a/pv/view/trace.cpp b/pv/view/trace.cpp index 2a1eb959..66f13edb 100644 --- a/pv/view/trace.cpp +++ b/pv/view/trace.cpp @@ -164,13 +164,8 @@ void Trace::paint_back(QPainter &p, const ViewItemPaintParams &pp) p.setPen(QPen(Qt::NoPen)); const pair extents = v_extents(); - - const int x = 0; - const int y = get_visual_y() + extents.first; - const int w = pp.right() - pp.left(); - const int h = extents.second - extents.first; - - p.drawRect(x, y, w, h); + p.drawRect(pp.left(), get_visual_y() + extents.first, + pp.width(), extents.second - extents.first); } void Trace::paint_axis(QPainter &p, const ViewItemPaintParams &pp, int y)