Fix #982 by correcting the bounding rect for the message

This commit is contained in:
Soeren Apel 2017-06-14 18:38:13 +02:00 committed by Uwe Hermann
parent e2649143f1
commit a998be27f1
1 changed files with 1 additions and 1 deletions

View File

@ -583,7 +583,7 @@ void DecodeTrace::draw_error(QPainter &p, const QString &message,
p.setBrush(ErrorBgColour); p.setBrush(ErrorBgColour);
const QRectF bounding_rect = 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, const QRectF text_rect = p.boundingRect(bounding_rect,
Qt::AlignCenter, message); Qt::AlignCenter, message);
const float r = text_rect.height() / 4; const float r = text_rect.height() / 4;