projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fe934a9
)
DecodeTrace: Make annotation block background opaque
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Wed, 26 Apr 2017 16:09:51 +0000
(10:09 -0600)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Wed, 3 May 2017 17:08:10 +0000
(19:08 +0200)
pv/view/decodetrace.cpp
patch
|
blob
|
history
diff --git
a/pv/view/decodetrace.cpp
b/pv/view/decodetrace.cpp
index 9132ea97c7850e910bc19b04dd38eb009f04d036..f45ecf58e2e1a94dba92b775ccf198cfea917c2c 100644
(file)
--- 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; });
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.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,
}
void DecodeTrace::draw_instant(const pv::data::decode::Annotation &a, QPainter &p,