From 4f68e5ffba6dd189597b1ff6f9af62472bff3a91 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sat, 23 May 2026 09:46:28 +0200 Subject: [PATCH] fix: fixed-width position prefix in Home Pages settings to prevent label shift Use %2d (right-aligned, always 3 chars) instead of %d so label x-position stays constant when going from single-digit (1-9) to double-digit (10-11). Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/SettingsScreen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/companion_radio/ui-new/SettingsScreen.h b/examples/companion_radio/ui-new/SettingsScreen.h index 4600dd80..10306cdf 100644 --- a/examples/companion_radio/ui-new/SettingsScreen.h +++ b/examples/companion_radio/ui-new/SettingsScreen.h @@ -374,7 +374,7 @@ class SettingsScreen : public UIScreen { } else if (isHomePage(item)) { int pos = homePagePosition(item, p); if (pos > 0) { - char pb[4]; snprintf(pb, sizeof(pb), "%d ", pos); + char pb[5]; snprintf(pb, sizeof(pb), "%2d ", pos); display.print(pb); } display.print(homePageLabel(item));