Merge "Revert "recovery: fix UI error when directories too many [1/1]"" into main am: 1fb40d753a
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/2823390 Change-Id: I8c1fbc879f4d2af1806fa90576c2a3f0a003466b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
e47edd1eae
1 changed files with 1 additions and 9 deletions
|
@ -181,15 +181,7 @@ int TextMenu::DrawItems(int x, int y, int screen_width, bool long_press) const {
|
||||||
if (!scrollable()) {
|
if (!scrollable()) {
|
||||||
offset += draw_funcs_.DrawHorizontalRule(y + offset) + 4;
|
offset += draw_funcs_.DrawHorizontalRule(y + offset) + 4;
|
||||||
}
|
}
|
||||||
|
for (size_t i = MenuStart(); i < MenuEnd(); ++i) {
|
||||||
int items_block_height = gr_fb_height() - y - offset;;
|
|
||||||
int total = (char_height_ + 4) * (selection() + 1);;
|
|
||||||
int j = 0;
|
|
||||||
if (total > items_block_height) {
|
|
||||||
j = ((total - items_block_height) / (char_height_ + 4)) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (size_t i = (MenuStart() + j); i < MenuEnd(); ++i) {
|
|
||||||
bool bold = false;
|
bool bold = false;
|
||||||
if (i == selection()) {
|
if (i == selection()) {
|
||||||
// Draw the highlight bar.
|
// Draw the highlight bar.
|
||||||
|
|
Loading…
Reference in a new issue