2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +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

@@ -400,11 +400,12 @@ void SetupInterfaceScale(
button,
[=] { repeatSetScale(cConfigScale(), repeatSetScale); });
});
window->show(Box<Ui::ConfirmBox>(
tr::lng_settings_need_restart(tr::now),
tr::lng_settings_restart_now(tr::now),
confirmed,
cancelled));
window->show(Ui::MakeConfirmBox({
.text = tr::lng_settings_need_restart(),
.confirmed = confirmed,
.cancelled = cancelled,
.confirmText = tr::lng_settings_restart_now(),
}));
} else if (scale != cConfigScale()) {
cSetConfigScale(scale);
Local::writeSettings();
@@ -505,13 +506,14 @@ void SetupHelp(
*requestId = 0;
}).send();
});
auto box = Box<Ui::ConfirmBox>(
tr::lng_settings_ask_sure(tr::now),
tr::lng_settings_ask_ok(tr::now),
tr::lng_settings_faq_button(tr::now),
sure,
OpenFaq);
box->setStrictCancel(true);
auto box = Ui::MakeConfirmBox({
.text = tr::lng_settings_ask_sure(),
.confirmed = sure,
.cancelled = OpenFaq,
.confirmText = tr::lng_settings_ask_ok(),
.cancelText = tr::lng_settings_faq_button(),
.strictCancel = true,
});
controller->show(std::move(box));
});
}