From d532e9588d204a4e3f8b2bb813d0b1bd91cc984b Mon Sep 17 00:00:00 2001 From: Rick Lan Date: Tue, 24 Mar 2020 22:57:09 +1000 Subject: [PATCH] fix ui glitch due to different font --- selfdrive/ui/sidebar.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/ui/sidebar.cc b/selfdrive/ui/sidebar.cc index f1eea6423..4ea239ea2 100644 --- a/selfdrive/ui/sidebar.cc +++ b/selfdrive/ui/sidebar.cc @@ -157,13 +157,13 @@ static void ui_draw_sidebar_metric(UIState *s, const char* label_str, const char nvgTextBox(s->vg, metric_x + 50, metric_y + 50, metric_w - 60, value_str, NULL); nvgFillColor(s->vg, COLOR_WHITE); - nvgFontSize(s->vg, 48); + nvgFontSize(s->vg, 46); nvgFontFace(s->vg, "sans-regular"); nvgTextAlign(s->vg, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE); nvgTextBox(s->vg, metric_x + 50, metric_y + 50 + 66, metric_w - 60, label_str, NULL); } else { nvgFillColor(s->vg, COLOR_WHITE); - nvgFontSize(s->vg, 48); + nvgFontSize(s->vg, 46); nvgFontFace(s->vg, "sans-bold"); nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE); nvgTextBox(s->vg, metric_x + 35, metric_y + (strlen(message_str) > 8 ? 40 : 50), metric_w - 50, message_str, NULL);