mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed resizing of label in section of profile info.
This commit is contained in:
parent
c985b77a48
commit
c4f45c4b7c
1 changed files with 6 additions and 5 deletions
|
@ -29,11 +29,9 @@ TextWithLabel CreateTextWithLabel(
|
||||||
parent,
|
parent,
|
||||||
object_ptr<Ui::VerticalLayout>(parent),
|
object_ptr<Ui::VerticalLayout>(parent),
|
||||||
padding);
|
padding);
|
||||||
result->setDuration(
|
result->setDuration(st::infoSlideDuration);
|
||||||
st::infoSlideDuration
|
|
||||||
);
|
|
||||||
auto layout = result->entity();
|
auto layout = result->entity();
|
||||||
auto nonEmptyText = std::move(
|
auto nonEmptyText = rpl::duplicate(
|
||||||
text
|
text
|
||||||
) | rpl::before_next([slide = result.data()](
|
) | rpl::before_next([slide = result.data()](
|
||||||
const TextWithEntities &value) {
|
const TextWithEntities &value) {
|
||||||
|
@ -46,10 +44,13 @@ TextWithLabel CreateTextWithLabel(
|
||||||
const TextWithEntities &value) {
|
const TextWithEntities &value) {
|
||||||
slide->show(anim::type::normal);
|
slide->show(anim::type::normal);
|
||||||
});
|
});
|
||||||
auto labeled = layout->add(object_ptr<Ui::FlatLabel>(
|
const auto labeled = layout->add(object_ptr<Ui::FlatLabel>(
|
||||||
layout,
|
layout,
|
||||||
std::move(nonEmptyText),
|
std::move(nonEmptyText),
|
||||||
textSt));
|
textSt));
|
||||||
|
std::move(text) | rpl::start_with_next([=] {
|
||||||
|
labeled->resizeToWidth(layout->width());
|
||||||
|
}, labeled->lifetime());
|
||||||
labeled->setSelectable(true);
|
labeled->setSelectable(true);
|
||||||
layout->add(Ui::CreateSkipWidget(layout, st::infoLabelSkip));
|
layout->add(Ui::CreateSkipWidget(layout, st::infoLabelSkip));
|
||||||
const auto subtext = layout->add(object_ptr<Ui::FlatLabel>(
|
const auto subtext = layout->add(object_ptr<Ui::FlatLabel>(
|
||||||
|
|
Loading…
Add table
Reference in a new issue