mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-23 16:56:55 +00:00
Slightly improved style of rpl text mapping.
This commit is contained in:
parent
2f0aa6ef05
commit
20a13663a6
@ -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(
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user