ArduinoMenu icon indicating copy to clipboard operation
ArduinoMenu copied to clipboard

Header text last character lost when entering submenu

Open hipotenusa opened this issue 5 years ago • 4 comments

Hello and thanks for sharing this wonderful time saving library!!

In my menu, I have a "Conf. Portal" submenu. Its prompt is displayed Ok while browsing:

image

But when I enter in the Submenu, last character of its prompt is lost, getting a remainder "Conf. Porta":

image

TOGGLE(configPortalRunning,subMenuSetConfigPortal,"",doNothing,noEvent,noStyle//,doExit,enterEvent,noStyle
  ,VALUE("Enabled",HIGH,doConfigPortal,noEvent)
  ,VALUE("Disabled",LOW,doConfigPortal,noEvent)
);

MENU(subMenuConfigPortal,"Conf. Portal",doNothing,noEvent,noStyle
  ,SUBMENU(subMenuSetConfigPortal)
  ,EXIT("<Back")
);

MENU(subMenuWiFi,"WiFi",doNothing,noEvent,noStyle
  ,SUBMENU(subMenuConfigPortal)
  ,EXIT("<Back")
);

MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle
  ,SUBMENU(subMenuWiFi)
  ,EXIT("<Back")
);

Does anyone know how to sort it out?

Thanks!

hipotenusa avatar Sep 03 '20 14:09 hipotenusa

Hi, this looks a lot like a bug... I have to do a similar setup to track it down, what display driver are you using?

neu-rah avatar Sep 03 '20 14:09 neu-rah

It´s a ST7735 + TFT_eSPI

hipotenusa avatar Sep 03 '20 14:09 hipotenusa

Giving text "Conf. Portal" to mainmenu prompt has the same effect: last character is not displayed. This issue may be related with #320. I have 12 characters available on submenus but only 11 on the title header I am at your disposition if I can be of any help

hipotenusa avatar Sep 04 '20 07:09 hipotenusa

Back to this issue it´s related with the panel definition., specifically with the font width. My original definition was:

#define fontW 12

and changing to:

#define fontW 10

made the title caption to appear completely:

Captura de pantalla 2022-11-01 170209

What is not clear yet to me is if this is a real issue or just a wrong font configuration given that the title was the only trimmed text and I assume the font setting is general for all lines of text.

hipotenusa avatar Nov 01 '22 18:11 hipotenusa