mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-28 15:22:55 +00:00
Use text aligns for message layout where necessary
This commit is contained in:
parent
1d7fe20520
commit
e934f8f0b3
@ -574,9 +574,9 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
} else {
|
} else {
|
||||||
// Render message line
|
// Render message line
|
||||||
if (isMine[i]) {
|
if (isMine[i]) {
|
||||||
int w = display->getStringWidth(cachedLines[i].c_str());
|
display->setTextAlignment(TEXT_ALIGN_RIGHT);
|
||||||
int rightX = SCREEN_WIDTH - w - 2;
|
drawStringWithEmotes(display, SCREEN_WIDTH, lineY, cachedLines[i], emotes, numEmotes);
|
||||||
drawStringWithEmotes(display, rightX, lineY, cachedLines[i], emotes, numEmotes);
|
display->setTextAlignment(TEXT_ALIGN_LEFT);
|
||||||
} else {
|
} else {
|
||||||
drawStringWithEmotes(display, x, lineY, cachedLines[i], emotes, numEmotes);
|
drawStringWithEmotes(display, x, lineY, cachedLines[i], emotes, numEmotes);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user