From: Joel Holdsworth Date: Tue, 30 Apr 2013 12:09:23 +0000 (+0100) Subject: Make labels an even height X-Git-Tag: pulseview-0.1.0~8 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b47d951efad3b51674e5af2fcfc29526cad6697f;p=pulseview.git 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. --- 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,