From 857ebbef1c10cdc02df03af1fb446c704809394e Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 26 Apr 2017 10:13:08 -0600 Subject: [PATCH] Trace: Fixed background rectangle It previously ignored the left x-coordinate, and left a 1-pixel gap at the right-hand side. --- pv/view/trace.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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) -- 2.30.2