Skip to content

Commit

Permalink
Update onroad.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
Casey Francis committed Jun 26, 2022
1 parent 2a8ac68 commit 55d784c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/ui/qt/onroad.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,10 @@ void OnroadHud::drawCenteredText(QPainter &p, int x, int y, const QString &text,
QFontMetrics fm(p.font());
QRect init_rect = fm.boundingRect(text);
QRect real_rect = fm.boundingRect(init_rect, 0, text);
real_rect.moveCenter({x, y});
real_rect.moveCenter({x, y - real_rect.height() / 2});

p.setPen(foraBozo);
p.drawText(real_rect, Qt::AlignCenter, text);
p.drawText(real_rect.x(), real_rect.bottom(), text);
}

void OnroadHud::drawIcon(QPainter &p, int x, int y, QPixmap &img, QBrush bg, float opacity) {
Expand Down

0 comments on commit 55d784c

Please sign in to comment.