projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ruler: Added context menu support
[pulseview.git]
/
pv
/
view
/
trace.cpp
diff --git
a/pv/view/trace.cpp
b/pv/view/trace.cpp
index 1464b5eea135d19aa7ad70ad41820c703fd7871f..df5a954b43a216f66d7cb11c5799464d882a3fe4 100644
(file)
--- a/
pv/view/trace.cpp
+++ b/
pv/view/trace.cpp
@@
-149,11
+149,10
@@
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(
const QSizeF label_size(
- text_size.width() +
View::
LabelPadding.width() * 2,
- ceilf((text_size.height() +
View::
LabelPadding.height() * 2) / 2) * 2);
+ text_size.width() + LabelPadding.width() * 2,
+ ceilf((text_size.height() + LabelPadding.height() * 2) / 2) * 2);
const float half_height = label_size.height() / 2;
return QRectF(
rect.right() - half_height - label_size.width() - 0.5,
const float half_height = label_size.height() / 2;
return QRectF(
rect.right() - half_height - label_size.width() - 0.5,
@@
-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