Skip to content

Commit ec8a475

Browse files
committed
Fix top bar selection label resizing.
1 parent e656cb8 commit ec8a475

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Telegram/SourceFiles/info/info_top_bar.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,7 @@ void TopBar::createSelectionControls() {
669669
) | rpl::start_to_stream(
670670
_selectionActionRequests,
671671
_cancelSelection->lifetime());
672+
672673
_selectionText = wrap(Ui::CreateChild<Ui::FadeWrap<Ui::LabelWithNumbers>>(
673674
this,
674675
object_ptr<Ui::LabelWithNumbers>(
@@ -679,6 +680,11 @@ void TopBar::createSelectionControls() {
679680
st::infoTopBarScale));
680681
_selectionText->setDuration(st::infoTopBarDuration);
681682
_selectionText->entity()->resize(0, _st.height);
683+
_selectionText->naturalWidthValue(
684+
) | rpl::skip(1) | rpl::start_with_next([=] {
685+
updateSelectionControlsGeometry(width());
686+
}, _selectionText->lifetime());
687+
682688
_forward = wrap(Ui::CreateChild<Ui::FadeWrap<Ui::IconButton>>(
683689
this,
684690
object_ptr<Ui::IconButton>(this, _st.mediaForward),

0 commit comments

Comments
 (0)