From 73e2cc96d172f4d80b527d6fcd4cc8d283d9e486 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 11 Nov 2022 11:21:18 +0400 Subject: [PATCH] Fix music player with RTL song names. --- Telegram/SourceFiles/media/player/media_player_widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/media/player/media_player_widget.cpp b/Telegram/SourceFiles/media/player/media_player_widget.cpp index 46676f132..d44c60b8d 100644 --- a/Telegram/SourceFiles/media/player/media_player_widget.cpp +++ b/Telegram/SourceFiles/media/player/media_player_widget.cpp @@ -859,7 +859,7 @@ void Widget::updateLabelsGeometry() { const auto widthForName = width() - left - getNameRight(); - _nameLabel->resizeToWidth(widthForName); + _nameLabel->resizeToNaturalWidth(widthForName); _nameLabel->moveToLeft(left, st::mediaPlayerNameTop - st::mediaPlayerName.style.font->ascent); const auto right = getTimeRight(); @@ -1056,8 +1056,8 @@ void Widget::handleSongChange() { .textWithEntities(true); } _nameLabel->setMarkedText(textWithEntities); - handlePlaylistUpdate(); + updateLabelsGeometry(); } void Widget::handlePlaylistUpdate() {