From dca615fe3d979283b041f8e828dd8df0d0ff2d24 Mon Sep 17 00:00:00 2001 From: whywilson Date: Thu, 21 Aug 2025 07:03:52 +0800 Subject: [PATCH] Optimize the text alignment of numeric keys on ssd1306. --- src/graphics/VirtualKeyboard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/VirtualKeyboard.cpp b/src/graphics/VirtualKeyboard.cpp index 6f32b4938..84d5551cb 100644 --- a/src/graphics/VirtualKeyboard.cpp +++ b/src/graphics/VirtualKeyboard.cpp @@ -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;