Fixed height counting
This commit is contained in:
parent
fa098be02e
commit
a0ec972c7a
2 changed files with 2 additions and 4 deletions
|
|
@ -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() {
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue