BACKENDS: Explicitly use ellipsis for the virtual keybord if needed

This is the default, so this commit does not change the behaviour.
But this will allow to change the default at a later stage.
This commit is contained in:
Thierry Crozat 2021-07-31 18:31:30 +01:00 committed by Eugene Sandulenko
parent ec06d940a2
commit 4fa0f7c9ba

View File

@ -441,7 +441,7 @@ void VirtualKeyboardGUI::updateDisplay() {
// draw to display surface
_dispSurface.fillRect(Rect(_dispSurface.w, _dispSurface.h), _dispBackColor);
_dispFont->drawString(&_dispSurface, dispText, 0, 0, _dispSurface.w, _dispForeColor);
_dispFont->drawString(&_dispSurface, dispText, 0, 0, _dispSurface.w, _dispForeColor, Graphics::kTextAlignLeft, 0, true);
String beforeCaret(wholeText.c_str() + _dispI, wholeText.c_str() + cursorPos);
_caretX = _dispFont->getStringWidth(beforeCaret);