Fix long content in group type box.

This commit is contained in:
John Preston 2021-01-15 20:19:27 +04:00
parent c7b1a37722
commit 7132ab5bf4
1 changed files with 4 additions and 3 deletions

View File

@ -616,11 +616,11 @@ void EditPeerTypeBox::setInnerFocus() {
void EditPeerTypeBox::prepare() { void EditPeerTypeBox::prepare() {
_peer->updateFull(); _peer->updateFull();
const auto content = Ui::CreateChild<Ui::VerticalLayout>(this); auto content = object_ptr<Ui::VerticalLayout>(this);
const auto controller = Ui::CreateChild<Controller>( const auto controller = Ui::CreateChild<Controller>(
this, this,
content, content.data(),
_peer, _peer,
_useLocationPhrases, _useLocationPhrases,
_privacySavedValue, _privacySavedValue,
@ -657,5 +657,6 @@ void EditPeerTypeBox::prepare() {
} }
addButton(tr::lng_cancel(), [=] { closeBox(); }); addButton(tr::lng_cancel(), [=] { closeBox(); });
setDimensionsToContent(st::boxWideWidth, content); setDimensionsToContent(st::boxWideWidth, content.data());
setInnerWidget(std::move(content));
} }