From 3cd6491a227127741b625c3c6244b339497c96d4 Mon Sep 17 00:00:00 2001 From: Ben Fennema Date: Wed, 8 Nov 2023 19:14:52 +0000 Subject: [PATCH] Revert "recovery: fix UI error when directories too many [1/1]" This reverts commit 159a5473a25f7359c951272ea0423ded8d6874b6. Reason for revert: This breaks menu scrolling on wear devices Bug: 309813434 Change-Id: If68683fcef0e9689fa6cfea1af5aab559f99fb3a --- recovery_ui/screen_ui.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/recovery_ui/screen_ui.cpp b/recovery_ui/screen_ui.cpp index 37e07646..ee3cbb13 100644 --- a/recovery_ui/screen_ui.cpp +++ b/recovery_ui/screen_ui.cpp @@ -181,15 +181,7 @@ int TextMenu::DrawItems(int x, int y, int screen_width, bool long_press) const { if (!scrollable()) { offset += draw_funcs_.DrawHorizontalRule(y + offset) + 4; } - - 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) { + for (size_t i = MenuStart(); i < MenuEnd(); ++i) { bool bold = false; if (i == selection()) { // Draw the highlight bar.