aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Fennema <fennema@google.com>2023-11-09 02:08:11 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-11-09 02:08:11 +0000
commit1fb40d753a1a43d96dc85131b04a068fe6058a94 (patch)
tree79a716cb1428e38eea3fc9fd2b9b009c52f93758
parent6de5720bf7df7ee03140f27d0f461b0eb9d8d00e (diff)
parent3cd6491a227127741b625c3c6244b339497c96d4 (diff)
downloadrecovery-1fb40d753a1a43d96dc85131b04a068fe6058a94.tar.gz
Merge "Revert "recovery: fix UI error when directories too many [1/1]"" into main
-rw-r--r--recovery_ui/screen_ui.cpp10
1 files changed, 1 insertions, 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.