Slightly improved style of rpl text mapping.

This commit is contained in:
23rd 2024-04-30 17:35:04 +03:00
parent 2f0aa6ef05
commit 20a13663a6
5 changed files with 7 additions and 7 deletions

View File

@ -757,9 +757,9 @@ void DeleteChatBox(not_null<Ui::GenericBox*> box, not_null<PeerData*> peer) {
const auto label = Ui::CreateChild<Ui::FlatLabel>(
line,
peer->isSelf()
? tr::lng_saved_messages() | rpl::map(Ui::Text::Bold)
? tr::lng_saved_messages() | Ui::Text::ToBold()
: maybeUser
? tr::lng_profile_delete_conversation() | rpl::map(Ui::Text::Bold)
? tr::lng_profile_delete_conversation() | Ui::Text::ToBold()
: rpl::single(Ui::Text::Bold(peer->name())),
box->getDelegate()->style().title);
line->widthValue(

View File

@ -224,7 +224,7 @@ PreviewWrap::PreviewWrap(
lt_user,
rpl::single(
item->history()->peer->shortName()
) | rpl::map(Ui::Text::RichLangValue),
) | Ui::Text::ToRichLangValue(),
Ui::Text::RichLangValue)
: (isRound
? tr::lng_ttl_round_tooltip_in

View File

@ -185,7 +185,7 @@ void AddBusinessSummary(
const auto label = content->add(
object_ptr<Ui::FlatLabel>(
content,
std::move(entry.title) | rpl::map(Ui::Text::Bold),
std::move(entry.title) | Ui::Text::ToBold(),
stLabel),
titlePadding);
label->setAttribute(Qt::WA_TransparentForMouseEvents);

View File

@ -986,7 +986,7 @@ void Premium::setupContent() {
object_ptr<Ui::FlatLabel>(
content,
tr::lng_premium_summary_bottom_subtitle(
) | rpl::map(Ui::Text::Bold),
) | Ui::Text::ToBold(),
stLabel),
st::defaultSubsectionTitlePadding);
content->add(
@ -1630,7 +1630,7 @@ void AddSummaryPremium(
const auto label = content->add(
object_ptr<Ui::FlatLabel>(
content,
std::move(entry.title) | rpl::map(Ui::Text::Bold),
std::move(entry.title) | Ui::Text::ToBold(),
stLabel),
titlePadding);
label->setAttribute(Qt::WA_TransparentForMouseEvents);

View File

@ -1199,7 +1199,7 @@ void ShowListBox(
const auto title = content->add(
object_ptr<Ui::FlatLabel>(
content,
base::take(entry.title) | rpl::map(Ui::Text::Bold),
base::take(entry.title) | Ui::Text::ToBold(),
stLabel),
entry.icon ? iconTitlePadding : titlePadding);
content->add(