From: Joel Holdsworth Date: Thu, 1 Nov 2012 23:17:02 +0000 (+0000) Subject: Pixel aligned signal labels X-Git-Tag: pulseview-0.1.0~225 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bb781376cb1ab29c67e85e2f1c761c031a527f0f;p=pulseview.git Pixel aligned signal labels --- 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()); }