Fixed height calculation for sponsored message text in media view.

This commit is contained in:
23rd
2026-02-05 08:27:07 +03:00
committed by John Preston
parent c9dbb83fba
commit ed8b3e1bba
@@ -486,6 +486,7 @@ void PlaybackSponsored::Message::mouseReleaseEvent(QMouseEvent *e) {
int PlaybackSponsored::Message::resizeGetHeight(int newWidth) {
const auto &padding = st::mediaSponsoredPadding;
const auto userpic = st::mediaSponsoredThumb;
_left = padding.left() + (_photo ? (userpic + padding.left()) : 0);
const auto innerWidth = newWidth - _left - _close->width();
const auto titleWidth = innerWidth - _about->width() - padding.right();
_titleHeight = _title.countHeight(titleWidth);
@@ -494,7 +495,6 @@ int PlaybackSponsored::Message::resizeGetHeight(int newWidth) {
const auto use = std::max(_titleHeight + _textHeight, userpic);
const auto height = padding.top() + use + padding.bottom();
_left = padding.left() + (_photo ? (userpic + padding.left()) : 0);
_top = padding.top() + (use - _titleHeight - _textHeight) / 2;
_about->move(