mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-05-30 11:43:55 +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>(
|
const auto close = Ui::CreateChild<Ui::IconButton>(
|
||||||
box.get(),
|
content,
|
||||||
st::boxTitleClose);
|
st::boxTitleClose);
|
||||||
close->setClickedCallback([=] {
|
close->setClickedCallback([=] { box->closeBox(); });
|
||||||
box->closeBox();
|
content->widthValue() | rpl::start_with_next([=](int) {
|
||||||
});
|
|
||||||
box->widthValue(
|
|
||||||
) | rpl::start_with_next([=](int width) {
|
|
||||||
close->moveToRight(0, 0);
|
close->moveToRight(0, 0);
|
||||||
close->raise();
|
|
||||||
}, close->lifetime());
|
}, 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), [=] {
|
const auto button = box->addButton(std::move(confirmText), [=] {
|
||||||
if (state->confirmButtonBusy.current()
|
if (state->confirmButtonBusy.current()
|
||||||
|| state->convertButtonBusy.current()) {
|
|| state->convertButtonBusy.current()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue