diff options
author | Danny Baumann <dannybaumann@web.de> | 2016-11-08 10:37:52 +0100 |
---|---|---|
committer | Adrian DC <radian.dc@gmail.com> | 2016-12-03 13:34:00 +0100 |
commit | 01d69b52f321c5b4403fd8be264f9901d9d0d443 (patch) | |
tree | 3367cf8bc64f384c15d44f5128b3cb3c3cbda683 | |
parent | 42ebc0f4e49117fd0ff47613d328a5543c2d0773 (diff) | |
download | android_bootable_recovery-stable/cm-13.0-ZNH5Y.tar.gz android_bootable_recovery-stable/cm-13.0-ZNH5Y.tar.bz2 android_bootable_recovery-stable/cm-13.0-ZNH5Y.zip |
Fix log text placement.stable/cm-13.0-ZNH5Y
Commit I4b56db78d13931fdd79580b801260bdfca0e9726 intended to constrain
the log to the lower quarter of the screen, but miscalculated the
respective limit value. Also make sure to display the log starting from
the last line.
RM-290
Change-Id: I87fb2f311ff312faeca8777559d46c1569f6b95f
-rw-r--r-- | screen_ui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp index 3c0bbaf3..9ddf4824 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -398,7 +398,7 @@ void ScreenRecoveryUI::draw_screen_locked() { if (show_text) { if (currentIcon == ERASING || currentIcon == INSTALLING_UPDATE || currentIcon == VIEWING_LOG) { - size_t y = currentIcon == INSTALLING_UPDATE ? gr_fb_height() / 4 : header_height_ + 4; + size_t y = currentIcon == INSTALLING_UPDATE ? 3 * gr_fb_height() / 4 : header_height_ + 4; SetColor(LOG); int cx, cy; @@ -407,7 +407,7 @@ void ScreenRecoveryUI::draw_screen_locked() { // display from the bottom up, until we hit the top of the // screen or we've displayed the entire text buffer. size_t ty, count; - int row = (text_first_row_ + log_text_rows_ - 1) % log_text_rows_; + int row = (text_row_ + log_text_rows_ - 1) % log_text_rows_; for (ty = gr_fb_height() - cy, count = 0; ty > y + 2 && count < log_text_rows_; ty -= (cy + 2), ++count) { |