Resize widgets after adding to VerticalLayout.

This commit is contained in:
John Preston 2023-10-25 21:23:30 +04:00
parent c36559a679
commit b05f7eb915

View file

@ -126,6 +126,10 @@ RpWidget *VerticalLayout::insertChild(
_rows.insert(
begin(_rows) + atPosition,
{ std::move(child), margin });
auto availRowWidth = widthNoMargins()
- margin.left()
- margin.right();
weak->resizeToNaturalWidth(availRowWidth);
weak->heightValue(
) | rpl::start_with_next_done([=] {
if (!_inResize) {