From dc8313f6ae6c87572512424818b9e24e7ef2383e Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 29 Oct 2023 07:08:52 +0400 Subject: [PATCH] Don't initially resizeToWidth(0). --- ui/wrap/vertical_layout.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/wrap/vertical_layout.cpp b/ui/wrap/vertical_layout.cpp index 88991ce..2303637 100644 --- a/ui/wrap/vertical_layout.cpp +++ b/ui/wrap/vertical_layout.cpp @@ -129,7 +129,9 @@ RpWidget *VerticalLayout::insertChild( auto availRowWidth = widthNoMargins() - margin.left() - margin.right(); - weak->resizeToNaturalWidth(availRowWidth); + if (availRowWidth > 0) { + weak->resizeToNaturalWidth(availRowWidth); + } weak->heightValue( ) | rpl::start_with_next_done([=] { if (!_inResize) {