From f8fb1dac99a631b263cd505cba93616002f20928 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Fri, 22 May 2026 18:13:27 +0200 Subject: [PATCH] fix: align SettingsScreen item label to dynamic char width Replace hardcoded x=8 with getCharWidth()+2 so the label doesn't overlap the '>' selector on displays with larger fonts (e-ink sz1 scale=2). Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/SettingsScreen.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/companion_radio/ui-new/SettingsScreen.h b/examples/companion_radio/ui-new/SettingsScreen.h index d848d2a1..17f96473 100644 --- a/examples/companion_radio/ui-new/SettingsScreen.h +++ b/examples/companion_radio/ui-new/SettingsScreen.h @@ -234,7 +234,7 @@ class SettingsScreen : public UIScreen { display.setCursor(0, y); display.print(sel ? ">" : " "); - display.setCursor(8, y); + display.setCursor(display.getCharWidth() + 2, y); if (item == BRIGHTNESS) { display.print("Bright"); @@ -328,7 +328,7 @@ class SettingsScreen : public UIScreen { } else if (item == ROTATION) { display.print("Rotation"); display.setCursor(display.valCol(), y); - { static const char* ROT_LABELS[] = { "0deg", "90deg", "180deg", "270deg" }; + { static const char* ROT_LABELS[] = { "0 deg", "90 deg", "180 deg", "270 deg" }; uint8_t r = p ? (p->display_rotation & 3) : 0; display.print(ROT_LABELS[r]); } #endif