From b47d951efad3b51674e5af2fcfc29526cad6697f Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Tue, 30 Apr 2013 13:09:23 +0100 Subject: [PATCH] Make labels an even height This prevents some of the blurring effects to the label outline that can be seen when the outline falls over a half-pixel. --- pv/view/signal.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pv/view/signal.cpp b/pv/view/signal.cpp index 9299e932..48e47f27 100644 --- a/pv/view/signal.cpp +++ b/pv/view/signal.cpp @@ -20,6 +20,8 @@ #include +#include + #include #include "signal.h" @@ -163,7 +165,7 @@ QRectF Signal::get_label_rect(int y, int right) const QSizeF label_size( _text_size.width() + View::LabelPadding.width() * 2, - _text_size.height() + View::LabelPadding.height() * 2); + ceilf((_text_size.height() + View::LabelPadding.height() * 2) / 2) * 2); const float label_arrow_length = label_size.height() / 2; return QRectF( right - label_arrow_length - label_size.width() - 0.5, -- 2.30.2