Editor: Mark simple confirmation/accept dialogs as non-resizable

Adds set_flag(FLAG_RESIZE_DISABLED, true) to ConfirmationDialog and
AcceptDialog instances which only contain plain content. Dialogs
with content that could leave the borders of the dialog were kept
as resizable.

The flag is set explicitly at dialog creation time, instead of the
previous auto-detect approach. In cases of uncertainty, the dialog was
left as resizable.
This commit is contained in:
João Diniz
2026-05-09 21:21:59 +01:00
parent aaaf76403e
commit 0046f29e63
37 changed files with 55 additions and 0 deletions
+1
View File
@@ -1023,6 +1023,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
add_child(file_browse);
set_ok_button_text(TTR("Create"));
alert = memnew(AcceptDialog);
alert->set_flag(Window::FLAG_RESIZE_DISABLED, true);
alert->get_label()->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
alert->get_label()->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
alert->get_label()->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);