mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-03 10:46:12 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
7510878f9e
commit
4f68e5ffba
@@ -374,7 +374,7 @@ class SettingsScreen : public UIScreen {
|
|||||||
} else if (isHomePage(item)) {
|
} else if (isHomePage(item)) {
|
||||||
int pos = homePagePosition(item, p);
|
int pos = homePagePosition(item, p);
|
||||||
if (pos > 0) {
|
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(pb);
|
||||||
}
|
}
|
||||||
display.print(homePageLabel(item));
|
display.print(homePageLabel(item));
|
||||||
|
|||||||
Reference in New Issue
Block a user