2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 00:25:17 +00:00

Fixed height counting

This commit is contained in:
RadRussianRus
2020-05-16 12:54:26 +03:00
parent fa098be02e
commit a0ec972c7a
2 changed files with 2 additions and 4 deletions

View File

@@ -449,9 +449,8 @@ void ConvertToSupergroupBox::prepare() {
_text.create(this, rpl::single(std::move(details)), st::boxLabel); _text.create(this, rpl::single(std::move(details)), st::boxLabel);
_textWidth = st::boxWideWidth - st::boxPadding.left() - st::boxButtonPadding.right(); const auto fullHeight = st::boxPadding.top() + _text->height() + st::boxPadding.bottom();
_textHeight = _text->countHeight(_textWidth); setDimensions(st::boxWideWidth, fullHeight);
setDimensions(st::boxWideWidth, _textHeight + st::boxPadding.bottom());
} }
void ConvertToSupergroupBox::convertToSupergroup() { void ConvertToSupergroupBox::convertToSupergroup() {

View File

@@ -141,7 +141,6 @@ private:
not_null<ChatData*> _chat; not_null<ChatData*> _chat;
object_ptr<Ui::FlatLabel> _text = { nullptr }; object_ptr<Ui::FlatLabel> _text = { nullptr };
int32 _textWidth, _textHeight;
}; };
class PinMessageBox : public Ui::BoxContent, public RPCSender { class PinMessageBox : public Ui::BoxContent, public RPCSender {