mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Use simplified TextStyle.
This commit is contained in:
@@ -20,8 +20,6 @@ passportPasswordLabel: FlatLabel(boxLabel) {
|
||||
passportPasswordLabelBold: FlatLabel(passportPasswordLabel) {
|
||||
style: TextStyle(boxLabelStyle) {
|
||||
font: font(boxFontSize semibold);
|
||||
linkFont: font(boxFontSize semibold);
|
||||
linkFontOver: font(boxFontSize semibold underline);
|
||||
}
|
||||
}
|
||||
passportPasswordSetupLabel: FlatLabel(passportPasswordLabel) {
|
||||
@@ -93,8 +91,7 @@ passportFormDividerHeight: 13px;
|
||||
passportFormLabelPadding: margins(22px, 7px, 22px, 14px);
|
||||
passportFormPolicy: FlatLabel(boxDividerLabel) {
|
||||
style: TextStyle(defaultTextStyle) {
|
||||
linkFont: font(fsize semibold underline);
|
||||
linkFontOver: font(fsize semibold underline);
|
||||
linkUnderline: kLinkUnderlineAlways;
|
||||
}
|
||||
palette: TextPalette(defaultTextPalette) {
|
||||
linkFg: windowSubTextFg;
|
||||
|
||||
@@ -144,6 +144,14 @@ not_null<Ui::RpWidget*> PanelForm::setupContent() {
|
||||
});
|
||||
}, lifetime());
|
||||
const auto policyUrl = _controller->privacyPolicyUrl();
|
||||
auto policyLink = tr::lng_passport_policy(
|
||||
lt_bot,
|
||||
rpl::single(bot->name())
|
||||
) | Ui::Text::ToLink(
|
||||
policyUrl
|
||||
) | rpl::map([=](TextWithEntities &&text) {
|
||||
return Ui::Text::Wrapped(std::move(text), EntityType::Bold);
|
||||
});
|
||||
auto text = policyUrl.isEmpty()
|
||||
? tr::lng_passport_allow(
|
||||
lt_bot,
|
||||
@@ -151,10 +159,7 @@ not_null<Ui::RpWidget*> PanelForm::setupContent() {
|
||||
) | Ui::Text::ToWithEntities()
|
||||
: tr::lng_passport_accept_allow(
|
||||
lt_policy,
|
||||
tr::lng_passport_policy(
|
||||
lt_bot,
|
||||
rpl::single(bot->name())
|
||||
) | Ui::Text::ToLink(policyUrl),
|
||||
std::move(policyLink),
|
||||
lt_bot,
|
||||
rpl::single('@' + bot->username()) | Ui::Text::ToWithEntities(),
|
||||
Ui::Text::WithEntities);
|
||||
|
||||
Reference in New Issue
Block a user