mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-03 02:36:11 +00:00
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:
co-authored by
Claude Sonnet 4.6
parent
744f263932
commit
f8fb1dac99
@@ -234,7 +234,7 @@ class SettingsScreen : public UIScreen {
|
|||||||
|
|
||||||
display.setCursor(0, y);
|
display.setCursor(0, y);
|
||||||
display.print(sel ? ">" : " ");
|
display.print(sel ? ">" : " ");
|
||||||
display.setCursor(8, y);
|
display.setCursor(display.getCharWidth() + 2, y);
|
||||||
|
|
||||||
if (item == BRIGHTNESS) {
|
if (item == BRIGHTNESS) {
|
||||||
display.print("Bright");
|
display.print("Bright");
|
||||||
@@ -328,7 +328,7 @@ class SettingsScreen : public UIScreen {
|
|||||||
} else if (item == ROTATION) {
|
} else if (item == ROTATION) {
|
||||||
display.print("Rotation");
|
display.print("Rotation");
|
||||||
display.setCursor(display.valCol(), y);
|
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;
|
uint8_t r = p ? (p->display_rotation & 3) : 0;
|
||||||
display.print(ROT_LABELS[r]); }
|
display.print(ROT_LABELS[r]); }
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user