From a3a9a0685c63ea57dc936e496cd5e6be5a71512e Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Thu, 7 Jul 2022 12:02:31 +0200 Subject: [PATCH] onroad.cc: fix mutcd sign width for metric speed limit --- selfdrive/ui/qt/onroad.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 604d3c09a9..ca39a89ae4 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -296,7 +296,7 @@ void NvgWindow::drawHud(QPainter &p) { // US/Canada (MUTCD style) sign if (has_us_speed_limit) { const int border_width = 6; - const int sign_width = (speedLimitStr.size() >= 3) ? 199 : 148; + const int sign_width = rect_width - 24; const int sign_height = 186; // White outer square