Update text size based on menu item title length

This commit is contained in:
Andrea Baccega 2024-01-27 18:10:55 +01:00
parent c99e6cc528
commit 153ab39ad1

View File

@ -254,6 +254,11 @@ void OledDisplay::handleUserInputState()
else
{
// Default menu handling. Just display the title and the indicators to go back and forth
if (strlen(menuItem.title) > 8) {
display.setTextSize(1, 2);
} else {
display.setTextSize(2);
}
centerText(menuItem.title);
displayIndicators();
display.display();