From 153ab39ad16293e2101947b967c6d4149073a80a Mon Sep 17 00:00:00 2001 From: Andrea Baccega Date: Sat, 27 Jan 2024 18:10:55 +0100 Subject: [PATCH] Update text size based on menu item title length --- src/displays/oled.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/displays/oled.cpp b/src/displays/oled.cpp index 58ad01f..81a9d1d 100644 --- a/src/displays/oled.cpp +++ b/src/displays/oled.cpp @@ -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();