diff --git a/Telegram/SourceFiles/boxes/send_credits_box.cpp b/Telegram/SourceFiles/boxes/send_credits_box.cpp index d00a95f1f..d0ddd819c 100644 --- a/Telegram/SourceFiles/boxes/send_credits_box.cpp +++ b/Telegram/SourceFiles/boxes/send_credits_box.cpp @@ -473,15 +473,11 @@ void SendCreditsBox( { const auto close = Ui::CreateChild( - box.get(), + content, st::boxTitleClose); - close->setClickedCallback([=] { - box->closeBox(); - }); - box->widthValue( - ) | rpl::start_with_next([=](int width) { + close->setClickedCallback([=] { box->closeBox(); }); + content->widthValue() | rpl::start_with_next([=](int) { close->moveToRight(0, 0); - close->raise(); }, close->lifetime()); } diff --git a/Telegram/SourceFiles/settings/settings_credits_graphics.cpp b/Telegram/SourceFiles/settings/settings_credits_graphics.cpp index eb4567a82..299f0437b 100644 --- a/Telegram/SourceFiles/settings/settings_credits_graphics.cpp +++ b/Telegram/SourceFiles/settings/settings_credits_graphics.cpp @@ -1434,6 +1434,16 @@ void ReceiptCreditsBox( } }; + if ((toRenew || canConvert || couldConvert || nonConvertible) && peer) { + const auto close = Ui::CreateChild( + content, + st::boxTitleClose); + close->setClickedCallback([=] { box->closeBox(); }); + content->widthValue() | rpl::start_with_next([=](int) { + close->moveToRight(0, 0); + }, content->lifetime()); + } + const auto button = box->addButton(std::move(confirmText), [=] { if (state->confirmButtonBusy.current() || state->convertButtonBusy.current()) {