]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/decodetrace.cpp
Fix #982 by correcting the bounding rect for the message
[pulseview.git] / pv / views / trace / decodetrace.cpp
index 6ccd3fb87dc085f9c50b9baa109645ac68c9b213..ef8210492ddc09d5f3b7a9bfd7cbf09187056a67 100644 (file)
@@ -583,7 +583,7 @@ void DecodeTrace::draw_error(QPainter &p, const QString &message,
        p.setBrush(ErrorBgColour);
 
        const QRectF bounding_rect =
-               QRectF(pp.width(), INT_MIN / 2 + y, pp.width(), INT_MAX);
+               QRectF(pp.left(), INT_MIN / 2 + y, pp.right(), INT_MAX);
        const QRectF text_rect = p.boundingRect(bounding_rect,
                Qt::AlignCenter, message);
        const float r = text_rect.height() / 4;