From a425a9c11ab78bbd0db59d733a1a12b5889cc8c7 Mon Sep 17 00:00:00 2001 From: firestarsdog <229254897+firestarsdog@users.noreply.github.com> Date: Thu, 9 Jul 2026 19:32:17 -0400 Subject: [PATCH] BIgUI WIP: Fix weird ? trunc on nav card --- selfdrive/ui/onroad/starpilot/navigation_card.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/selfdrive/ui/onroad/starpilot/navigation_card.py b/selfdrive/ui/onroad/starpilot/navigation_card.py index 3ad18dff82..b856126b5e 100644 --- a/selfdrive/ui/onroad/starpilot/navigation_card.py +++ b/selfdrive/ui/onroad/starpilot/navigation_card.py @@ -232,13 +232,13 @@ class NavigationCardRenderer(Widget): truncated = word_index < len(words) if truncated and lines: shortened = lines[-1] - candidate = f"{shortened}…" + candidate = f"{shortened}..." while shortened and measure_text_cached(self._font_bold, candidate, font_size).x > max_width: if " " in shortened: shortened = shortened.rsplit(" ", 1)[0] else: shortened = shortened[:-1] - candidate = f"{shortened}…" if shortened else "…" + candidate = f"{shortened}..." if shortened else "..." lines[-1] = candidate return lines[:max_lines], truncated @@ -259,10 +259,10 @@ class NavigationCardRenderer(Widget): return text shortened = text.rstrip() - candidate = f"{shortened}…" + candidate = f"{shortened}..." while shortened and measure_text_cached(self._font_medium, candidate, font_size).x > max_width: shortened = shortened[:-1].rstrip() - candidate = f"{shortened}…" if shortened else "…" + candidate = f"{shortened}..." if shortened else "..." return candidate def _draw_wrapped_lines(self, lines: list[str], x: float, y: float, font_size: int) -> None: