From e4af1570cb471707273401fc1e6fb3f42fe1e379 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 4 Feb 2025 21:54:40 +0300 Subject: [PATCH] Replaced link button for switch of business hours with small round one. --- .../info/profile/info_profile_actions.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index bedf78abf6..c0a776cdc3 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -534,10 +534,7 @@ base::options::toggle ShowPeerIdBelowAbout({ tr::lng_info_hours_label(), st::infoLabel); label->setAttribute(Qt::WA_TransparentForMouseEvents); - const auto link = Ui::CreateChild( - labelWrap, - QString()); - rpl::combine( + auto linkText = rpl::combine( state->nonTrivial.value(), state->hours.value(), state->mine.value(), @@ -552,10 +549,12 @@ base::options::toggle ShowPeerIdBelowAbout({ : my ? tr::lng_info_hours_my_time() : tr::lng_info_hours_local_time(); - }) | rpl::flatten_latest( - ) | rpl::start_with_next([=](const QString &text) { - link->setText(text); - }, link->lifetime()); + }) | rpl::flatten_latest(); + const auto link = Ui::CreateChild( + labelWrap, + std::move(linkText), + st::defaultTableSmallButton); + link->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); link->setClickedCallback([=] { state->myTimezone = !state->myTimezone.current(); state->expanded = true;