Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cf6fe2c authored by Tao Bao's avatar Tao Bao
Browse files

screen_ui: Fix a case that may truncate the last char.

ScreenRecoveryUI::DrawWrappedTextLines() should be called with
kMarginWidth only. Because it's using a line limit of text_cols_,
which is unaware of kMenuIdent.

Bug: 64293520
Test: No missing char with long header text.
Change-Id: Ib4d08de2c56473a483ff9964eb6cec31f8a74c9a
(cherry picked from commit 13aa4a902ba2fa304fc9fe826f797a4e0e2182b7)
parent ee6fefd2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -344,7 +344,8 @@ void ScreenRecoveryUI::draw_screen_locked() {
    y += DrawTextLines(x, y, HasThreeButtons() ? REGULAR_HELP : LONG_PRESS_HELP);

    SetColor(HEADER);
    y += DrawWrappedTextLines(x, y, menu_headers_);
    // Ignore kMenuIndent, which is not taken into account by text_cols_.
    y += DrawWrappedTextLines(kMarginWidth, y, menu_headers_);

    SetColor(MENU);
    y += DrawHorizontalRule(y) + 4;