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>(
|
const auto label = Ui::CreateChild<Ui::FlatLabel>(
|
||||||
line,
|
line,
|
||||||
peer->isSelf()
|
peer->isSelf()
|
||||||
? tr::lng_saved_messages() | rpl::map(Ui::Text::Bold)
|
? tr::lng_saved_messages() | Ui::Text::ToBold()
|
||||||
: maybeUser
|
: 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())),
|
: rpl::single(Ui::Text::Bold(peer->name())),
|
||||||
box->getDelegate()->style().title);
|
box->getDelegate()->style().title);
|
||||||
line->widthValue(
|
line->widthValue(
|
||||||
|
|
|
@ -224,7 +224,7 @@ PreviewWrap::PreviewWrap(
|
||||||
lt_user,
|
lt_user,
|
||||||
rpl::single(
|
rpl::single(
|
||||||
item->history()->peer->shortName()
|
item->history()->peer->shortName()
|
||||||
) | rpl::map(Ui::Text::RichLangValue),
|
) | Ui::Text::ToRichLangValue(),
|
||||||
Ui::Text::RichLangValue)
|
Ui::Text::RichLangValue)
|
||||||
: (isRound
|
: (isRound
|
||||||
? tr::lng_ttl_round_tooltip_in
|
? tr::lng_ttl_round_tooltip_in
|
||||||
|
|
|
@ -185,7 +185,7 @@ void AddBusinessSummary(
|
||||||
const auto label = content->add(
|
const auto label = content->add(
|
||||||
object_ptr<Ui::FlatLabel>(
|
object_ptr<Ui::FlatLabel>(
|
||||||
content,
|
content,
|
||||||
std::move(entry.title) | rpl::map(Ui::Text::Bold),
|
std::move(entry.title) | Ui::Text::ToBold(),
|
||||||
stLabel),
|
stLabel),
|
||||||
titlePadding);
|
titlePadding);
|
||||||
label->setAttribute(Qt::WA_TransparentForMouseEvents);
|
label->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
|
|
|
@ -986,7 +986,7 @@ void Premium::setupContent() {
|
||||||
object_ptr<Ui::FlatLabel>(
|
object_ptr<Ui::FlatLabel>(
|
||||||
content,
|
content,
|
||||||
tr::lng_premium_summary_bottom_subtitle(
|
tr::lng_premium_summary_bottom_subtitle(
|
||||||
) | rpl::map(Ui::Text::Bold),
|
) | Ui::Text::ToBold(),
|
||||||
stLabel),
|
stLabel),
|
||||||
st::defaultSubsectionTitlePadding);
|
st::defaultSubsectionTitlePadding);
|
||||||
content->add(
|
content->add(
|
||||||
|
@ -1630,7 +1630,7 @@ void AddSummaryPremium(
|
||||||
const auto label = content->add(
|
const auto label = content->add(
|
||||||
object_ptr<Ui::FlatLabel>(
|
object_ptr<Ui::FlatLabel>(
|
||||||
content,
|
content,
|
||||||
std::move(entry.title) | rpl::map(Ui::Text::Bold),
|
std::move(entry.title) | Ui::Text::ToBold(),
|
||||||
stLabel),
|
stLabel),
|
||||||
titlePadding);
|
titlePadding);
|
||||||
label->setAttribute(Qt::WA_TransparentForMouseEvents);
|
label->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
|
|
|
@ -1199,7 +1199,7 @@ void ShowListBox(
|
||||||
const auto title = content->add(
|
const auto title = content->add(
|
||||||
object_ptr<Ui::FlatLabel>(
|
object_ptr<Ui::FlatLabel>(
|
||||||
content,
|
content,
|
||||||
base::take(entry.title) | rpl::map(Ui::Text::Bold),
|
base::take(entry.title) | Ui::Text::ToBold(),
|
||||||
stLabel),
|
stLabel),
|
||||||
entry.icon ? iconTitlePadding : titlePadding);
|
entry.icon ? iconTitlePadding : titlePadding);
|
||||||
content->add(
|
content->add(
|
||||||
|
|
Loading…
Reference in New Issue