2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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

@@ -234,11 +234,12 @@ void Controller::showTermsDelete() {
}
};
show(
Box<Ui::ConfirmBox>(
tr::lng_terms_delete_warning(tr::now),
tr::lng_terms_delete_now(tr::now),
st::attentionBoxButton,
deleteByTerms),
Ui::MakeConfirmBox({
.text = tr::lng_terms_delete_warning(),
.confirmed = deleteByTerms,
.confirmText = tr::lng_terms_delete_now(),
.confirmStyle = &st::attentionBoxButton,
}),
Ui::LayerOption::KeepOther);
}
@@ -403,11 +404,12 @@ void Controller::showLogoutConfirmation() {
close();
}
};
show(Box<Ui::ConfirmBox>(
tr::lng_sure_logout(tr::now),
tr::lng_settings_logout(tr::now),
st::attentionBoxButton,
callback));
show(Ui::MakeConfirmBox({
.text = tr::lng_sure_logout(),
.confirmed = callback,
.confirmText = tr::lng_settings_logout(),
.confirmStyle = &st::attentionBoxButton,
}));
}
Window::Adaptive &Controller::adaptive() const {