Resize widgets after adding to VerticalLayout.
This commit is contained in:
parent
c36559a679
commit
b05f7eb915
1 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue