recovery: Draw header lines with less padding
* Makes Format Data or Rescue Party menus much more readable
Change-Id: I039e536e26897d659dfc4dd260d95a32760eb6f3
diff --git a/recovery_ui/screen_ui.cpp b/recovery_ui/screen_ui.cpp
index e9a1fe0..9c31f4a 100644
--- a/recovery_ui/screen_ui.cpp
+++ b/recovery_ui/screen_ui.cpp
@@ -340,6 +340,8 @@
}
int MenuDrawFunctions::DrawWrappedTextLines(int x, int y, const std::vector<std::string>& lines) const {
+ const int padding = MenuItemPadding() / 2;
+
// Keep symmetrical margins based on the given offset (i.e. x).
size_t text_cols = (gr_fb_width() - x * 2) / MenuCharWidth();
int offset = 0;
@@ -361,9 +363,12 @@
next_start += last_space + 1;
}
}
- offset += DrawTextLine(x, y + offset, sub, false);
+ offset += DrawTextLine(x, y + offset, sub, false) - (2 * MenuItemPadding() - padding);
}
}
+ if (!lines.empty()) {
+ offset += 2 * MenuItemPadding() - padding;
+ }
return offset;
}