]> sigrok.org Git - pulseview.git/commitdiff
DecodeTrace: Make annotation block background opaque
authorJoel Holdsworth <redacted>
Wed, 26 Apr 2017 16:09:51 +0000 (10:09 -0600)
committerUwe Hermann <redacted>
Wed, 3 May 2017 17:08:10 +0000 (19:08 +0200)
pv/view/decodetrace.cpp

index 9132ea97c7850e910bc19b04dd38eb009f04d036..f45ecf58e2e1a94dba92b775ccf198cfea917c2c 100644 (file)
@@ -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,