From bb781376cb1ab29c67e85e2f1c761c031a527f0f Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Thu, 1 Nov 2012 23:17:02 +0000 Subject: [PATCH 1/1] Pixel aligned signal labels --- pv/signal.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pv/signal.cpp b/pv/signal.cpp index bcb32813..9bc44d9d 100644 --- a/pv/signal.cpp +++ b/pv/signal.cpp @@ -106,13 +106,14 @@ QRectF Signal::get_label_rect(const QRect &rect) { 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( - 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()); } -- 2.30.2