projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RowItemParams: Added font and text_height
[pulseview.git]
/
pv
/
view
/
decodetrace.cpp
diff --git
a/pv/view/decodetrace.cpp
b/pv/view/decodetrace.cpp
index 0b129c3bf7b9d45acb6a69e89d0433576f3a4d6c..0b4cd7c599962ab5cd5399554c2326cfee077665 100644
(file)
--- a/
pv/view/decodetrace.cpp
+++ b/
pv/view/decodetrace.cpp
@@
-160,9
+160,7
@@
pair<int, int> DecodeTrace::v_extents() const
{
/// @todo Replace this with an implementation that knows the true
/// height of the trace
{
/// @todo Replace this with an implementation that knows the true
/// height of the trace
- QFontMetrics m(QApplication::font());
- const int text_height = m.boundingRect(QRect(), 0, "Tg").height();
- const int row_height = (text_height * 6) / 4;
+ const int row_height = (RowItemPaintParams::text_height() * 6) / 4;
return make_pair(-row_height / 2, row_height * 7 / 2);
}
return make_pair(-row_height / 2, row_height * 7 / 2);
}
@@
-176,8
+174,7
@@
void DecodeTrace::paint_mid(QPainter &p, const RowItemPaintParams &pp)
{
using namespace pv::data::decode;
{
using namespace pv::data::decode;
- QFontMetrics m(QApplication::font());
- text_height_ = m.boundingRect(QRect(), 0, "Tg").height();
+ text_height_ = RowItemPaintParams::text_height();
row_height_ = (text_height_ * 6) / 4;
const int annotation_height = (text_height_ * 5) / 4;
row_height_ = (text_height_ * 6) / 4;
const int annotation_height = (text_height_ * 5) / 4;