From ec8a475a2cba9e967b8e395f46d3cde236d61447 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 14 Aug 2025 18:43:06 +0400 Subject: [PATCH] Fix top bar selection label resizing. --- Telegram/SourceFiles/info/info_top_bar.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Telegram/SourceFiles/info/info_top_bar.cpp b/Telegram/SourceFiles/info/info_top_bar.cpp index 71bac1b3c8..af7006b382 100644 --- a/Telegram/SourceFiles/info/info_top_bar.cpp +++ b/Telegram/SourceFiles/info/info_top_bar.cpp @@ -669,6 +669,7 @@ void TopBar::createSelectionControls() { ) | rpl::start_to_stream( _selectionActionRequests, _cancelSelection->lifetime()); + _selectionText = wrap(Ui::CreateChild>( this, object_ptr( @@ -679,6 +680,11 @@ void TopBar::createSelectionControls() { st::infoTopBarScale)); _selectionText->setDuration(st::infoTopBarDuration); _selectionText->entity()->resize(0, _st.height); + _selectionText->naturalWidthValue( + ) | rpl::skip(1) | rpl::start_with_next([=] { + updateSelectionControlsGeometry(width()); + }, _selectionText->lifetime()); + _forward = wrap(Ui::CreateChild>( this, object_ptr(this, _st.mediaForward),