From f2e91f4a6b45df616bb6cb6278dee11787e9346d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 6 Feb 2021 15:43:20 +0100 Subject: [PATCH] Fixed date background rendering issue --- src/GUI/markerinfoitem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GUI/markerinfoitem.cpp b/src/GUI/markerinfoitem.cpp index 076cf72b..35925184 100644 --- a/src/GUI/markerinfoitem.cpp +++ b/src/GUI/markerinfoitem.cpp @@ -44,17 +44,17 @@ void MarkerInfoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem Q_UNUSED(widget); QFontMetrics fm(_font); - QRectF ry(OFFSET, -fm.height() + fm.descent(), - fm.boundingRect(_time).width(), fm.height() - fm.descent()); - QRectF rx(OFFSET, 0, fm.boundingRect(_date).width(), fm.height() + QRectF rd(OFFSET, -fm.height() + fm.descent(), + fm.boundingRect(_date).width(), fm.height() - fm.descent()); + QRectF rt(OFFSET, 0, fm.boundingRect(_time).width(), fm.height() - fm.descent()); painter->setPen(Qt::NoPen); QColor bc(painter->background().color()); bc.setAlpha(196); painter->setBrush(QBrush(bc)); - painter->drawRect(ry); - painter->drawRect(rx); + painter->drawRect(rt); + painter->drawRect(rd); painter->setBrush(Qt::NoBrush); painter->setFont(_font);