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 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-22 18:13:27 +02:00
parent 744f263932
commit f8fb1dac99

View File

@@ -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