You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Apply clamp_to_embedder on parent resize and popup.
Fixes #75084.
The clamp_to_embedder setting was added in 8be16e0704,
but was not set on any of the in-editor dialogs.
This patch sets `clamp_to_embedder` on editor dialogs so they cannot be dragged out of the frame.
This also modifies `clamp_to_embedder` so a window is clamped to the bounds of an embedder when
it pops up and when the parent is resized.
This commit is contained in:
@@ -457,7 +457,7 @@ void CreateDialog::_notification(int p_what) {
|
||||
search_box->call_deferred(SNAME("grab_focus")); // still not visible
|
||||
search_box->select_all();
|
||||
} else {
|
||||
EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "create_new_node", Rect2(get_position(), get_size()));
|
||||
EditorSettings::get_singleton()->set_project_metadata("dialog_bounds", "create_new_node", Rect2(get_position(), get_size()));
|
||||
}
|
||||
} break;
|
||||
|
||||
@@ -805,4 +805,5 @@ CreateDialog::CreateDialog() {
|
||||
|
||||
register_text_enter(search_box);
|
||||
set_hide_on_ok(false);
|
||||
set_clamp_to_embedder(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user