From 7132ab5bf4a20ee3288de0ed9497a14adf17906b Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 15 Jan 2021 20:19:27 +0400 Subject: [PATCH] Fix long content in group type box. --- Telegram/SourceFiles/boxes/peers/edit_peer_type_box.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_type_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_type_box.cpp index 117419c568..734108fd58 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_type_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_type_box.cpp @@ -616,11 +616,11 @@ void EditPeerTypeBox::setInnerFocus() { void EditPeerTypeBox::prepare() { _peer->updateFull(); - const auto content = Ui::CreateChild(this); + auto content = object_ptr(this); const auto controller = Ui::CreateChild( this, - content, + content.data(), _peer, _useLocationPhrases, _privacySavedValue, @@ -657,5 +657,6 @@ void EditPeerTypeBox::prepare() { } addButton(tr::lng_cancel(), [=] { closeBox(); }); - setDimensionsToContent(st::boxWideWidth, content); + setDimensionsToContent(st::boxWideWidth, content.data()); + setInnerWidget(std::move(content)); }