From e934f8f0b3460075922feba044cf76a95a0f9cf0 Mon Sep 17 00:00:00 2001 From: Jason P Date: Sat, 11 Oct 2025 08:56:26 -0500 Subject: [PATCH] Use text aligns for message layout where necessary --- src/graphics/draw/MessageRenderer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphics/draw/MessageRenderer.cpp b/src/graphics/draw/MessageRenderer.cpp index 13dd38d4d..f7efc8835 100644 --- a/src/graphics/draw/MessageRenderer.cpp +++ b/src/graphics/draw/MessageRenderer.cpp @@ -574,9 +574,9 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16 } else { // Render message line if (isMine[i]) { - int w = display->getStringWidth(cachedLines[i].c_str()); - int rightX = SCREEN_WIDTH - w - 2; - drawStringWithEmotes(display, rightX, lineY, cachedLines[i], emotes, numEmotes); + display->setTextAlignment(TEXT_ALIGN_RIGHT); + drawStringWithEmotes(display, SCREEN_WIDTH, lineY, cachedLines[i], emotes, numEmotes); + display->setTextAlignment(TEXT_ALIGN_LEFT); } else { drawStringWithEmotes(display, x, lineY, cachedLines[i], emotes, numEmotes); }