Fix stickers with large info string layout.

Fixes #4781.
This commit is contained in:
John Preston 2018-06-03 21:33:24 +03:00
parent 364aaaae5b
commit b64bbc7708
1 changed files with 3 additions and 0 deletions

View File

@ -2766,6 +2766,9 @@ QSize HistorySticker::countOptimalSize() {
if (_pixh < 1) _pixh = 1;
auto maxWidth = qMax(_pixw, st::minPhotoSize);
auto minHeight = qMax(_pixh, st::minPhotoSize);
accumulate_max(
maxWidth,
_parent->infoWidth() + 2 * st::msgDateImgPadding.x());
if (_parent->media() == this) {
maxWidth += additionalWidth();
}