Fixed menu body height

This commit is contained in:
Raphael Coeffic
2021-06-17 09:02:28 +02:00
parent 6d2d740d95
commit d4c23446e5
+1 -1
View File
@@ -176,7 +176,7 @@ void Menu::updatePosition()
// there is no navigation bar at the left, we may center the window on screen
auto headerHeight = content->title.empty() ? 0 : POPUP_HEADER_HEIGHT;
auto bodyHeight = limit<coord_t>(
MENUS_MIN_HEIGHT, content->body.lines.size() * MENUS_LINE_HEIGHT - 1,
MENUS_MIN_HEIGHT, content->body.lines.size() * MENUS_LINE_HEIGHT,
MENUS_MAX_HEIGHT);
content->setTop((LCD_H - headerHeight - bodyHeight) / 2 + MENUS_OFFSET_TOP);
content->setHeight(headerHeight + bodyHeight);