mirror of
https://github.com/arwidcool/Solder-Plate.git
synced 2024-12-01 01:27:17 +01:00
Update text size based on menu item title length
This commit is contained in:
parent
c99e6cc528
commit
153ab39ad1
@ -254,6 +254,11 @@ void OledDisplay::handleUserInputState()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Default menu handling. Just display the title and the indicators to go back and forth
|
// 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);
|
centerText(menuItem.title);
|
||||||
displayIndicators();
|
displayIndicators();
|
||||||
display.display();
|
display.display();
|
||||||
|
Loading…
Reference in New Issue
Block a user