]> sigrok.org Git - pulseview.git/commitdiff
Corrected label layout when text is empty
authorJoel Holdsworth <redacted>
Sun, 31 Mar 2013 10:42:07 +0000 (11:42 +0100)
committerJoel Holdsworth <redacted>
Sun, 31 Mar 2013 10:42:07 +0000 (11:42 +0100)
pv/view/signal.cpp

index abc29e2695a84ee7292670014ccd6462e6e362de..9299e9326234b62fdc323009598f312fe14f5975 100644 (file)
@@ -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)