menu_view: refine zero-size condition

Commit "menu_view: ignore zero-sized widgets in box layout" introduces
zero-sized child widgets as a special case but defined zero-sized as
zero covered pixels (w*h == 0). However, for layouting, a widget with a
non-zero height and zero width is not zero-sized.

This patch refines the zero-size condition such that only widgets with
both zero width and zero height are considered as zero-sized.

It thereby solves the missing display of empty lines in the text_area
component.
This commit is contained in:
Norman Feske 2023-10-18 11:52:32 +02:00 committed by Christian Helmuth
parent 87b7dfed5d
commit 1224162072

View File

@ -57,7 +57,7 @@ struct Menu_view::Box_layout_widget : Widget
w.position(position);
/* don't account space for zero-sized child widgets */
if (child_min_size.count() == 0)
if ((child_min_size.w() == 0) && (child_min_size.h() == 0))
return;
if (_direction == VERTICAL) {