Skip to content

Commit

Permalink
Fixed height counting
Browse files Browse the repository at this point in the history
  • Loading branch information
EricKotato committed May 16, 2020
1 parent 138f3ec commit bd69a1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Telegram/SourceFiles/boxes/confirm_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 0 additions & 1 deletion Telegram/SourceFiles/boxes/confirm_box.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ class ConvertToSupergroupBox : public Ui::BoxContent, public RPCSender {

not_null<ChatData*> _chat;
object_ptr<Ui::FlatLabel> _text = { nullptr };
int32 _textWidth, _textHeight;
};

class PinMessageBox : public Ui::BoxContent, public RPCSender {
Expand Down

0 comments on commit bd69a1a

Please sign in to comment.