projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
34c1ef0
)
Pixel aligned signal labels
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Thu, 1 Nov 2012 23:17:02 +0000
(23:17 +0000)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Thu, 1 Nov 2012 23:19:58 +0000
(23:19 +0000)
pv/signal.cpp
patch
|
blob
|
history
diff --git
a/pv/signal.cpp
b/pv/signal.cpp
index bcb328136826d42a1451e149af6a1cbe32054923..9bc44d9d161d2fbe6316d6b291ba1bb0f3530158 100644
(file)
--- a/
pv/signal.cpp
+++ b/
pv/signal.cpp
@@
-106,13
+106,14
@@
QRectF Signal::get_label_rect(const QRect &rect)
{
using pv::view::View;
{
using pv::view::View;
- const float nominal_offset = get_nominal_offset(rect);
+ const float nominal_offset = get_nominal_offset(rect)
+ 0.5
;
const QSizeF label_size(
_text_size.width() + View::LabelPadding.width() * 2,
_text_size.height() + View::LabelPadding.height() * 2);
const float label_arrow_length = label_size.height() / 2;
return QRectF(
const QSizeF label_size(
_text_size.width() + View::LabelPadding.width() * 2,
_text_size.height() + View::LabelPadding.height() * 2);
const float label_arrow_length = label_size.height() / 2;
return QRectF(
- rect.right() - label_arrow_length - label_size.width(),
+ rect.right() - label_arrow_length -
+ label_size.width() - 0.5,
nominal_offset - label_size.height() / 2,
label_size.width(), label_size.height());
}
nominal_offset - label_size.height() / 2,
label_size.width(), label_size.height());
}