From d034410a3fb5a24243b6efabf94e9b7511a8ed03 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 9 Jun 2022 08:05:11 +0300 Subject: [PATCH] Fixed icon position of invite links in add members box. --- .../SourceFiles/boxes/peers/add_participants_box.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/boxes/peers/add_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/add_participants_box.cpp index 96e09b809..c8d39858e 100644 --- a/Telegram/SourceFiles/boxes/peers/add_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/add_participants_box.cpp @@ -199,10 +199,18 @@ void AddParticipantsBoxController::addInviteLinkButton() { tr::lng_profile_add_via_link(), st::inviteViaLinkButton), style::margins(0, st::membersMarginTop, 0, 0)); - object_ptr( + + const auto icon = Ui::CreateChild( button->entity(), st::inviteViaLinkIcon, - st::inviteViaLinkIconPosition); + QPoint()); + button->entity()->heightValue( + ) | rpl::start_with_next([=](int height) { + icon->moveToLeft( + st::inviteViaLinkIconPosition.x(), + (height - st::inviteViaLinkIcon.height()) / 2); + }, icon->lifetime()); + button->entity()->setClickedCallback([=] { showBox(Box(_peer)); });