mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-28 04:31:58 +00:00
Optimize the text alignment of numeric keys on ssd1306.
This commit is contained in:
@@ -443,7 +443,7 @@ void VirtualKeyboard::drawKey(OLEDDisplay *display, const VirtualKey &key, bool
|
|||||||
if (textX < x)
|
if (textX < x)
|
||||||
textX = x; // guard
|
textX = x; // guard
|
||||||
} else {
|
} else {
|
||||||
if (display->getHeight() <= 64) {
|
if (display->getHeight() <= 64 && (key.character >= '0' && key.character <= '9')) {
|
||||||
textX = x + (width - textWidth + 1) / 2;
|
textX = x + (width - textWidth + 1) / 2;
|
||||||
} else {
|
} else {
|
||||||
textX = x + (width - textWidth) / 2;
|
textX = x + (width - textWidth) / 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user