projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ruler: Made HoverArrowSize proportional to text size
[pulseview.git]
/
pv
/
view
/
trace.cpp
diff --git
a/pv/view/trace.cpp
b/pv/view/trace.cpp
index b24afac24ac303d99275749342a7485f2633841f..24f97fb76da1c2f0052008354d801aef1bae2925 100644
(file)
--- a/
pv/view/trace.cpp
+++ b/
pv/view/trace.cpp
@@
-149,8
+149,7
@@
QRectF Trace::label_rect(const QRectF &rect) const
QFontMetrics m(QApplication::font());
const QSize text_size(
QFontMetrics m(QApplication::font());
const QSize text_size(
- m.boundingRect(QRect(), 0, name_).width(),
- m.boundingRect(QRect(), 0, "Tg").height());
+ m.boundingRect(QRect(), 0, name_).width(), m.height());
const QSizeF label_size(
text_size.width() + View::LabelPadding.width() * 2,
ceilf((text_size.height() + View::LabelPadding.height() * 2) / 2) * 2);
const QSizeF label_size(
text_size.width() + View::LabelPadding.width() * 2,
ceilf((text_size.height() + View::LabelPadding.height() * 2) / 2) * 2);
@@
-162,7
+161,7
@@
QRectF Trace::label_rect(const QRectF &rect) const
label_size.height());
}
label_size.height());
}
-void Trace::paint_axis(QPainter &p, const
Ro
wItemPaintParams &pp, int y)
+void Trace::paint_axis(QPainter &p, const
Vie
wItemPaintParams &pp, int y)
{
p.setPen(AxisPen);
p.drawLine(QPointF(pp.left(), y + 0.5f), QPointF(pp.right(), y + 0.5f));
{
p.setPen(AxisPen);
p.drawLine(QPointF(pp.left(), y + 0.5f), QPointF(pp.right(), y + 0.5f));
@@
-228,7
+227,7
@@
void Trace::on_colour_changed(const QColor &colour)
set_colour(colour);
if (owner_)
set_colour(colour);
if (owner_)
- owner_->appearance_changed(true, false);
+ owner_->
row_item_
appearance_changed(true, false);
}
} // namespace view
}
} // namespace view