From 5ce37f0fcfb35a13d518406c33757a41a2454dba Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sun, 31 Mar 2013 11:42:07 +0100 Subject: [PATCH] Corrected label layout when text is empty --- 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 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) -- 2.30.2