Optimize the text alignment of numeric keys on ssd1306.

This commit is contained in:
whywilson
2025-08-21 07:03:52 +08:00
parent cca2ead2c1
commit dca615fe3d

View File

@@ -443,7 +443,7 @@ void VirtualKeyboard::drawKey(OLEDDisplay *display, const VirtualKey &key, bool
if (textX < x)
textX = x; // guard
} else {
if (display->getHeight() <= 64) {
if (display->getHeight() <= 64 && (key.character >= '0' && key.character <= '9')) {
textX = x + (width - textWidth + 1) / 2;
} else {
textX = x + (width - textWidth) / 2;