Skip to content

Commit a0ec972

Browse files
committed
Fixed height counting
1 parent fa098be commit a0ec972

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Telegram/SourceFiles/boxes/confirm_box.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,8 @@ void ConvertToSupergroupBox::prepare() {
449449

450450
_text.create(this, rpl::single(std::move(details)), st::boxLabel);
451451

452-
_textWidth = st::boxWideWidth - st::boxPadding.left() - st::boxButtonPadding.right();
453-
_textHeight = _text->countHeight(_textWidth);
454-
setDimensions(st::boxWideWidth, _textHeight + st::boxPadding.bottom());
452+
const auto fullHeight = st::boxPadding.top() + _text->height() + st::boxPadding.bottom();
453+
setDimensions(st::boxWideWidth, fullHeight);
455454
}
456455

457456
void ConvertToSupergroupBox::convertToSupergroup() {

Telegram/SourceFiles/boxes/confirm_box.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ class ConvertToSupergroupBox : public Ui::BoxContent, public RPCSender {
141141

142142
not_null<ChatData*> _chat;
143143
object_ptr<Ui::FlatLabel> _text = { nullptr };
144-
int32 _textWidth, _textHeight;
145144
};
146145

147146
class PinMessageBox : public Ui::BoxContent, public RPCSender {

0 commit comments

Comments
 (0)