diff --git a/radio/src/fonts/std/font_05x07.png b/radio/src/fonts/std/font_05x07.png index 22213129e..ecce792a0 100644 Binary files a/radio/src/fonts/std/font_05x07.png and b/radio/src/fonts/std/font_05x07.png differ diff --git a/radio/src/gui/menu_model.cpp b/radio/src/gui/menu_model.cpp index 3f8a650e1..e4af21281 100644 --- a/radio/src/gui/menu_model.cpp +++ b/radio/src/gui/menu_model.cpp @@ -768,7 +768,12 @@ void editName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, uin lcd_putsLeft(y, STR_NAME); #endif - lcd_putsnAtt(x, y, name, size, ZCHAR | ((active && s_editMode <= 0) ? INVERS : 0)); + uint8_t mode = 0; + if (active) { + if (s_editMode <= 0) mode = INVERS+FIXEDWIDTH; + else mode = FIXEDWIDTH; + } + lcd_putsnAtt(x, y, name, size, ZCHAR | mode); if (active) { uint8_t cur = editNameCursorPos; @@ -831,8 +836,9 @@ void editName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, uin name[cur] = v; eeDirty(EE_MODEL); } - lcd_putsnAtt(x, y, name, editNameCursorPos, ZCHAR | ((active && s_editMode <= 0) ? INVERS : 0)); - lcd_putcAtt(lcdLastPos, y, idx2char(v), INVERS); + lcd_putcAtt(x+editNameCursorPos*FW, y, idx2char(v), INVERS+FIXEDWIDTH); +// lcd_putsnAtt(x, y, name, editNameCursorPos, ZCHAR); +// lcd_putcAtt(lcdLastPos, y, idx2char(v), INVERS); } else { cur = 0; diff --git a/radio/src/lcd.cpp b/radio/src/lcd.cpp index 24089ff37..723dce392 100644 --- a/radio/src/lcd.cpp +++ b/radio/src/lcd.cpp @@ -287,7 +287,10 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags) } } else if (i <= 5) b = pgm_read_byte(q++); - if (b == 0xff) continue; + if (b == 0xff) { + if (flags & FIXEDWIDTH) b = 0; + else continue; + } if (inv) b = ~b; #if !defined(CPUM64) || defined(EXTSTD) if (!(flags & BOLD) && (i == 7)) continue; @@ -459,6 +462,7 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t { uint8_t fw = FWNUM; int8_t mode = MODE(flags); + flags &= ~LEADING0; bool dblsize = flags & DBLSIZE; #if defined(CPUARM) bool midsize = flags & MIDSIZE; @@ -490,6 +494,7 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t len = mode + 1; } + if (dblsize) { fw += FWNUM; } @@ -933,7 +938,7 @@ void putsVBat(xcoord_t x, uint8_t y, LcdFlags att) void putsStrIdx(xcoord_t x, uint8_t y, const pm_char *str, uint8_t idx, LcdFlags att) { - lcd_putsAtt(x, y, str, att); + lcd_putsAtt(x, y, str, att & ~LEADING0); lcd_outdezNAtt(lcdNextPos, y, idx, att|LEFT, 2); } diff --git a/radio/src/lcd.h b/radio/src/lcd.h index 4cfa02c15..2ba458c7f 100644 --- a/radio/src/lcd.h +++ b/radio/src/lcd.h @@ -78,7 +78,7 @@ /* lcd putc flags */ #define CONDENSED 0x08 - +#define FIXEDWIDTH 0x10 /* lcd puts flags */ /* no 0x80 here because of "GV"1 which is aligned LEFT */ /* no 0x10 here because of "MODEL"01 which uses LEADING0 */