From: Joel Holdsworth Date: Wed, 26 Apr 2017 16:09:51 +0000 (-0600) Subject: DecodeTrace: Make annotation block background opaque X-Git-Tag: pulseview-0.4.0~98 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3082ee9327af17da58c25122ac68b828676ca61e;p=pulseview.git DecodeTrace: Make annotation block background opaque --- diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index 9132ea97..f45ecf58 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -484,11 +484,17 @@ void DecodeTrace::draw_annotation_block( annotations.begin(), annotations.end(), [&](const Annotation &a) { return a.format() == format; }); + const QRectF rect(start, top, end - start, bottom - top); + const int r = h / 4; + + p.setPen(QPen(Qt::NoPen)); + p.setBrush(Qt::white); + p.drawRoundedRect(rect, r, r); + p.setPen((single_format ? OutlineColours[colour] : Qt::gray)); p.setBrush(QBrush((single_format ? Colours[colour] : Qt::gray), Qt::Dense4Pattern)); - p.drawRoundedRect( - QRectF(start, top, end - start, bottom - top), h / 4, h / 4); + p.drawRoundedRect(rect, r, r); } void DecodeTrace::draw_instant(const pv::data::decode::Annotation &a, QPainter &p,