mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Fixed date background rendering issue
This commit is contained in:
parent
7604346799
commit
f2e91f4a6b
@ -44,17 +44,17 @@ void MarkerInfoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
|||||||
Q_UNUSED(widget);
|
Q_UNUSED(widget);
|
||||||
|
|
||||||
QFontMetrics fm(_font);
|
QFontMetrics fm(_font);
|
||||||
QRectF ry(OFFSET, -fm.height() + fm.descent(),
|
QRectF rd(OFFSET, -fm.height() + fm.descent(),
|
||||||
fm.boundingRect(_time).width(), fm.height() - fm.descent());
|
fm.boundingRect(_date).width(), fm.height() - fm.descent());
|
||||||
QRectF rx(OFFSET, 0, fm.boundingRect(_date).width(), fm.height()
|
QRectF rt(OFFSET, 0, fm.boundingRect(_time).width(), fm.height()
|
||||||
- fm.descent());
|
- fm.descent());
|
||||||
|
|
||||||
painter->setPen(Qt::NoPen);
|
painter->setPen(Qt::NoPen);
|
||||||
QColor bc(painter->background().color());
|
QColor bc(painter->background().color());
|
||||||
bc.setAlpha(196);
|
bc.setAlpha(196);
|
||||||
painter->setBrush(QBrush(bc));
|
painter->setBrush(QBrush(bc));
|
||||||
painter->drawRect(ry);
|
painter->drawRect(rt);
|
||||||
painter->drawRect(rx);
|
painter->drawRect(rd);
|
||||||
painter->setBrush(Qt::NoBrush);
|
painter->setBrush(Qt::NoBrush);
|
||||||
|
|
||||||
painter->setFont(_font);
|
painter->setFont(_font);
|
||||||
|
Loading…
Reference in New Issue
Block a user