aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-08-16 15:25:55 -0500
committerTao Bao2017-08-16 19:04:53 -0500
commit2cf6fe2ced4c117d132afd2c6e40fe0d937d0fca (patch)
tree7bdc1d4c4db0d4f837d2c81bba870f4f7e3fe1b4
parentee6fefd2f203a7df2164b3262fa54e62f61e6ad2 (diff)
downloadplatform-bootable-recovery-2cf6fe2ced4c117d132afd2c6e40fe0d937d0fca.tar.gz
platform-bootable-recovery-2cf6fe2ced4c117d132afd2c6e40fe0d937d0fca.tar.xz
platform-bootable-recovery-2cf6fe2ced4c117d132afd2c6e40fe0d937d0fca.zip
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)
-rw-r--r--screen_ui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index e056512b..a0255019 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -344,7 +344,8 @@ void ScreenRecoveryUI::draw_screen_locked() {
344 y += DrawTextLines(x, y, HasThreeButtons() ? REGULAR_HELP : LONG_PRESS_HELP); 344 y += DrawTextLines(x, y, HasThreeButtons() ? REGULAR_HELP : LONG_PRESS_HELP);
345 345
346 SetColor(HEADER); 346 SetColor(HEADER);
347 y += DrawWrappedTextLines(x, y, menu_headers_); 347 // Ignore kMenuIndent, which is not taken into account by text_cols_.
348 y += DrawWrappedTextLines(kMarginWidth, y, menu_headers_);
348 349
349 SetColor(MENU); 350 SetColor(MENU);
350 y += DrawHorizontalRule(y) + 4; 351 y += DrawHorizontalRule(y) + 4;