Slightly improved style of terms label in gift box from settings.

This commit is contained in:
23rd 2023-12-18 03:16:38 +03:00
parent de8b09d7fc
commit db8338156a
1 changed files with 11 additions and 18 deletions

View File

@ -531,24 +531,17 @@ void GiftsBox(
} }
// Footer. // Footer.
auto terms = object_ptr<Ui::FlatLabel>( {
box,
tr::lng_premium_gift_terms(
lt_link,
tr::lng_premium_gift_terms_link(
) | rpl::map([=](const QString &t) {
return Ui::Text::Link(t, 1);
}),
Ui::Text::WithEntities),
st::premiumGiftTerms);
terms->setLink(1, std::make_shared<LambdaClickHandler>([=] {
box->closeBox();
Settings::ShowPremium(session, QString());
}));
terms->resizeToWidth(available);
box->addRow( box->addRow(
object_ptr<Ui::CenterWrap<Ui::FlatLabel>>(box, std::move(terms)), object_ptr<Ui::DividerLabel>(
st::premiumGiftTermsPadding); box,
object_ptr<Ui::FlatLabel>(
box,
session->api().premium().statusTextValue(), // TODO.
st::premiumGiftTerms),
st::defaultBoxDividerLabelPadding),
{});
}
// Button. // Button.
const auto &stButton = st::premiumGiftBox; const auto &stButton = st::premiumGiftBox;