From d6801517bb72434e74d3b4244af16adfb95c85bd Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sat, 25 Dec 2021 20:42:43 +0300 Subject: [PATCH] Removed text commands from url auth box. --- Telegram/SourceFiles/boxes/url_auth_box.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Telegram/SourceFiles/boxes/url_auth_box.cpp b/Telegram/SourceFiles/boxes/url_auth_box.cpp index 685d3ca3ce..1a05510fd3 100644 --- a/Telegram/SourceFiles/boxes/url_auth_box.cpp +++ b/Telegram/SourceFiles/boxes/url_auth_box.cpp @@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "data/data_session.h" #include "data/data_user.h" #include "core/click_handler_types.h" +#include "ui/text/text_utilities.h" #include "ui/wrap/vertical_layout.h" #include "ui/widgets/checkbox.h" #include "ui/widgets/labels.h" @@ -255,11 +256,11 @@ not_null UrlAuthBox::setupContent( tr::lng_url_auth_open_confirm(tr::now, lt_link, url), st::boxLabel), st::boxPadding); - const auto addCheckbox = [&](const QString &text) { + const auto addCheckbox = [&](const TextWithEntities &text) { const auto checkbox = result->add( object_ptr( result, - QString(), + text, true, st::urlAuthCheckbox), style::margins( @@ -268,23 +269,22 @@ not_null UrlAuthBox::setupContent( st::boxPadding.right(), st::boxPadding.bottom())); checkbox->setAllowTextLines(); - checkbox->setText(text, true); return checkbox; }; const auto auth = addCheckbox( tr::lng_url_auth_login_option( tr::now, lt_domain, - textcmdStartSemibold() + domain + textcmdStopSemibold(), + Ui::Text::Bold(domain), lt_user, - (textcmdStartSemibold() - + session->user()->name - + textcmdStopSemibold()))); + Ui::Text::Bold(session->user()->name), + Ui::Text::WithEntities)); const auto allow = bot ? addCheckbox(tr::lng_url_auth_allow_messages( tr::now, lt_bot, - textcmdStartSemibold() + bot->firstName + textcmdStopSemibold())) + Ui::Text::Bold(bot->firstName), + Ui::Text::WithEntities)) : nullptr; if (allow) { rpl::single(