Increase minsize for some Project Conversion dialogs
This is more of a workaround than a fix. The underlying issue is that `ConfirmationDialog` doesn't always update its size if you change its text. (or it updates it AFTER it had already popped up). `wrap_controls` doesn't help here.
This commit is contained in:
parent
6f64349bfe
commit
a16dfaa39c
1 changed files with 7 additions and 7 deletions
|
@ -2240,11 +2240,11 @@ void ProjectManager::_open_selected_projects_ask() {
|
|||
return;
|
||||
}
|
||||
|
||||
const Size2i popup_min_width = Size2i(600.0 * EDSCALE, 0);
|
||||
const Size2i popup_min_size = Size2i(600.0 * EDSCALE, 400.0 * EDSCALE);
|
||||
|
||||
if (selected_list.size() > 1) {
|
||||
multi_open_ask->set_text(vformat(TTR("You requested to open %d projects in parallel. Do you confirm?\nNote that usual checks for engine version compatibility will be bypassed."), selected_list.size()));
|
||||
multi_open_ask->popup_centered(popup_min_width);
|
||||
multi_open_ask->popup_centered(popup_min_size);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2266,7 +2266,7 @@ void ProjectManager::_open_selected_projects_ask() {
|
|||
// Check if the config_version property was empty or 0.
|
||||
if (config_version == 0) {
|
||||
ask_update_settings->set_text(vformat(TTR("The selected project \"%s\" does not specify its supported Godot version in its configuration file (\"project.godot\").\n\nProject path: %s\n\nIf you proceed with opening it, it will be converted to Godot's current configuration file format.\n\nWarning: You won't be able to open the project with previous versions of the engine anymore."), project.project_name, project.path));
|
||||
ask_update_settings->popup_centered(popup_min_width);
|
||||
ask_update_settings->popup_centered(popup_min_size);
|
||||
return;
|
||||
}
|
||||
// Check if we need to convert project settings from an earlier engine version.
|
||||
|
@ -2279,14 +2279,14 @@ void ProjectManager::_open_selected_projects_ask() {
|
|||
ask_update_settings->set_text(vformat(TTR("The selected project \"%s\" was generated by an older engine version, and needs to be converted for this version.\n\nProject path: %s\n\nDo you want to convert it?\n\nWarning: You won't be able to open the project with previous versions of the engine anymore."), project.project_name, project.path));
|
||||
ask_update_settings->get_ok_button()->set_text(TTR("Convert project.godot"));
|
||||
}
|
||||
ask_update_settings->popup_centered(popup_min_width);
|
||||
ask_update_settings->popup_centered(popup_min_size);
|
||||
ask_update_settings->get_cancel_button()->grab_focus(); // To prevent accidents.
|
||||
return;
|
||||
}
|
||||
// Check if the file was generated by a newer, incompatible engine version.
|
||||
if (config_version > ProjectSettings::CONFIG_VERSION) {
|
||||
dialog_error->set_text(vformat(TTR("Can't open project \"%s\" at the following path:\n\n%s\n\nThe project settings were created by a newer engine version, whose settings are not compatible with this version."), project.project_name, project.path));
|
||||
dialog_error->popup_centered(popup_min_width);
|
||||
dialog_error->popup_centered(popup_min_size);
|
||||
return;
|
||||
}
|
||||
// Check if the project is using features not supported by this build of Godot.
|
||||
|
@ -2315,7 +2315,7 @@ void ProjectManager::_open_selected_projects_ask() {
|
|||
warning_message += TTR("Open anyway? Project will be modified.");
|
||||
ask_update_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
ask_update_settings->set_text(warning_message);
|
||||
ask_update_settings->popup_centered(popup_min_width);
|
||||
ask_update_settings->popup_centered(popup_min_size);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2325,7 +2325,7 @@ void ProjectManager::_open_selected_projects_ask() {
|
|||
|
||||
void ProjectManager::_full_convert_button_pressed() {
|
||||
ask_update_settings->hide();
|
||||
ask_full_convert_dialog->popup_centered(Size2i(600.0 * EDSCALE, 0));
|
||||
ask_full_convert_dialog->popup_centered(Size2i(600.0 * EDSCALE, 400.0 * EDSCALE));
|
||||
ask_full_convert_dialog->get_cancel_button()->grab_focus();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue