2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +00:00

Replaced Ui::InformBox and Ui::ConfirmBox with GenericBox.

This commit is contained in:
23rd
2022-02-27 11:23:20 +03:00
parent d5a44a2ba4
commit 5718789d53
89 changed files with 796 additions and 733 deletions

View File

@@ -636,7 +636,7 @@ private:
Full _data;
object_ptr<Inner> _inner;
QPointer<Ui::ConfirmBox> _terminateBox;
QPointer<Ui::BoxContent> _terminateBox;
base::Timer _shortPollTimer;
@@ -823,11 +823,12 @@ void SessionsContent::terminate(Fn<void()> terminateRequest, QString message) {
}
terminateRequest();
});
auto box = Box<Ui::ConfirmBox>(
message,
tr::lng_settings_reset_button(tr::now),
st::attentionBoxButton,
callback);
auto box = Ui::MakeConfirmBox({
.text = message,
.confirmed = callback,
.confirmText = tr::lng_settings_reset_button(),
.confirmStyle = &st::attentionBoxButton,
});
_terminateBox = Ui::MakeWeak(box.data());
_controller->show(std::move(box), Ui::LayerOption::KeepOther);
}