2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-29 05:29:23 +00:00

Fix top bar selection label resizing.

This commit is contained in:
John Preston 2025-08-14 18:43:06 +04:00
parent e656cb8118
commit ec8a475a2c

View File

@ -669,6 +669,7 @@ void TopBar::createSelectionControls() {
) | rpl::start_to_stream( ) | rpl::start_to_stream(
_selectionActionRequests, _selectionActionRequests,
_cancelSelection->lifetime()); _cancelSelection->lifetime());
_selectionText = wrap(Ui::CreateChild<Ui::FadeWrap<Ui::LabelWithNumbers>>( _selectionText = wrap(Ui::CreateChild<Ui::FadeWrap<Ui::LabelWithNumbers>>(
this, this,
object_ptr<Ui::LabelWithNumbers>( object_ptr<Ui::LabelWithNumbers>(
@ -679,6 +680,11 @@ void TopBar::createSelectionControls() {
st::infoTopBarScale)); st::infoTopBarScale));
_selectionText->setDuration(st::infoTopBarDuration); _selectionText->setDuration(st::infoTopBarDuration);
_selectionText->entity()->resize(0, _st.height); _selectionText->entity()->resize(0, _st.height);
_selectionText->naturalWidthValue(
) | rpl::skip(1) | rpl::start_with_next([=] {
updateSelectionControlsGeometry(width());
}, _selectionText->lifetime());
_forward = wrap(Ui::CreateChild<Ui::FadeWrap<Ui::IconButton>>( _forward = wrap(Ui::CreateChild<Ui::FadeWrap<Ui::IconButton>>(
this, this,
object_ptr<Ui::IconButton>(this, _st.mediaForward), object_ptr<Ui::IconButton>(this, _st.mediaForward),