summaryrefslogtreecommitdiffstats
path: root/editor/scene_create_dialog.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-01-03 19:21:26 +0300
committerYuri Sizov <yuris@humnom.net>2023-01-09 15:54:04 +0300
commit00b5222f66105d20817a7e25976c254114a22e60 (patch)
treef8a24ec3b2c4cf13b458917f57bf7c3e5b3ecb62 /editor/scene_create_dialog.cpp
parente84bab8e4f3c3bac0d203eca415ab856c29dd337 (diff)
downloadredot-engine-00b5222f66105d20817a7e25976c254114a22e60.tar.gz
Fix inconsistent state of Controls when editing and running scenes
Diffstat (limited to 'editor/scene_create_dialog.cpp')
-rw-r--r--editor/scene_create_dialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/scene_create_dialog.cpp b/editor/scene_create_dialog.cpp
index c1dbd4d6bc..c861fadcf0 100644
--- a/editor/scene_create_dialog.cpp
+++ b/editor/scene_create_dialog.cpp
@@ -171,7 +171,9 @@ Node *SceneCreateDialog::create_scene_root() {
break;
case ROOT_USER_INTERFACE: {
Control *gui_ctl = memnew(Control);
+ // Making the root control full rect by default is more useful for resizable UIs.
gui_ctl->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
+ gui_ctl->set_grow_direction_preset(Control::PRESET_FULL_RECT);
root = gui_ctl;
} break;
case ROOT_OTHER: