mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +02:00
Added top close button to ReceiptCreditsBox.
This commit is contained in:
parent
73936dca73
commit
27a5ba4681
2 changed files with 13 additions and 7 deletions
|
@ -473,15 +473,11 @@ void SendCreditsBox(
|
|||
|
||||
{
|
||||
const auto close = Ui::CreateChild<Ui::IconButton>(
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
|
@ -1434,6 +1434,16 @@ void ReceiptCreditsBox(
|
|||
}
|
||||
};
|
||||
|
||||
if ((toRenew || canConvert || couldConvert || nonConvertible) && peer) {
|
||||
const auto close = Ui::CreateChild<Ui::IconButton>(
|
||||
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()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue