Fix music player with RTL song names.

This commit is contained in:
John Preston 2022-11-11 11:21:18 +04:00
parent d756ecc609
commit 73e2cc96d1

View file

@ -859,7 +859,7 @@ void Widget::updateLabelsGeometry() {
const auto widthForName = width() const auto widthForName = width()
- left - left
- getNameRight(); - getNameRight();
_nameLabel->resizeToWidth(widthForName); _nameLabel->resizeToNaturalWidth(widthForName);
_nameLabel->moveToLeft(left, st::mediaPlayerNameTop - st::mediaPlayerName.style.font->ascent); _nameLabel->moveToLeft(left, st::mediaPlayerNameTop - st::mediaPlayerName.style.font->ascent);
const auto right = getTimeRight(); const auto right = getTimeRight();
@ -1056,8 +1056,8 @@ void Widget::handleSongChange() {
.textWithEntities(true); .textWithEntities(true);
} }
_nameLabel->setMarkedText(textWithEntities); _nameLabel->setMarkedText(textWithEntities);
handlePlaylistUpdate(); handlePlaylistUpdate();
updateLabelsGeometry();
} }
void Widget::handlePlaylistUpdate() { void Widget::handlePlaylistUpdate() {