diff --git a/Telegram/SourceFiles/boxes/confirm_box.cpp b/Telegram/SourceFiles/boxes/confirm_box.cpp index c4b712ca9..0fe8a85b1 100644 --- a/Telegram/SourceFiles/boxes/confirm_box.cpp +++ b/Telegram/SourceFiles/boxes/confirm_box.cpp @@ -449,9 +449,8 @@ void ConvertToSupergroupBox::prepare() { _text.create(this, rpl::single(std::move(details)), st::boxLabel); - _textWidth = st::boxWideWidth - st::boxPadding.left() - st::boxButtonPadding.right(); - _textHeight = _text->countHeight(_textWidth); - setDimensions(st::boxWideWidth, _textHeight + st::boxPadding.bottom()); + const auto fullHeight = st::boxPadding.top() + _text->height() + st::boxPadding.bottom(); + setDimensions(st::boxWideWidth, fullHeight); } void ConvertToSupergroupBox::convertToSupergroup() { diff --git a/Telegram/SourceFiles/boxes/confirm_box.h b/Telegram/SourceFiles/boxes/confirm_box.h index ee42a8b7d..406b76bb6 100644 --- a/Telegram/SourceFiles/boxes/confirm_box.h +++ b/Telegram/SourceFiles/boxes/confirm_box.h @@ -141,7 +141,6 @@ private: not_null _chat; object_ptr _text = { nullptr }; - int32 _textWidth, _textHeight; }; class PinMessageBox : public Ui::BoxContent, public RPCSender {