From: Joel Holdsworth Date: Sun, 31 Mar 2013 10:42:07 +0000 (+0100) Subject: Corrected label layout when text is empty X-Git-Tag: pulseview-0.1.0~60 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5ce37f0fcfb35a13d518406c33757a41a2454dba;p=pulseview.git Corrected label layout when text is empty --- diff --git a/pv/view/signal.cpp b/pv/view/signal.cpp index abc29e26..9299e932 100644 --- a/pv/view/signal.cpp +++ b/pv/view/signal.cpp @@ -152,7 +152,9 @@ void Signal::paint_axis(QPainter &p, int y, int left, int right) void Signal::compute_text_size(QPainter &p) { - _text_size = p.boundingRect(QRectF(), 0, _name).size(); + _text_size = QSize( + p.boundingRect(QRectF(), 0, _name).width(), + p.boundingRect(QRectF(), 0, "Tg").height()); } QRectF Signal::get_label_rect(int y, int right)