diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2023-04-23 18:44:05 +0800 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-04-26 14:32:21 +0200 |
commit | 9336866de008540986cc6b26c3c5f2cd72cfcf8f (patch) | |
tree | 3184cfb6b3b840642c93b90dacd714c915d29fda /editor | |
parent | 01014a74753ed08f42ab81bebc65473bcd254312 (diff) |
Fix layout list not resizing in editor layout dialog
(cherry picked from commit dfc628bc548a571f1dcf6d1969b7b9c553f738e1)
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_layouts_dialog.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp index 655ab45099..31228ab57d 100644 --- a/editor/editor_layouts_dialog.cpp +++ b/editor/editor_layouts_dialog.cpp @@ -122,21 +122,18 @@ void EditorLayoutsDialog::_post_popup() { EditorLayoutsDialog::EditorLayoutsDialog() { makevb = memnew(VBoxContainer); add_child(makevb); - makevb->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5); - makevb->set_anchor_and_offset(SIDE_RIGHT, Control::ANCHOR_END, -5); layout_names = memnew(ItemList); - makevb->add_margin_child(TTR("Select existing layout:"), layout_names); layout_names->set_auto_height(true); layout_names->set_custom_minimum_size(Size2(300 * EDSCALE, 50 * EDSCALE)); layout_names->set_visible(true); layout_names->set_offset(SIDE_TOP, 5); - layout_names->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5); - layout_names->set_anchor_and_offset(SIDE_RIGHT, Control::ANCHOR_END, -5); layout_names->set_v_size_flags(Control::SIZE_EXPAND_FILL); layout_names->set_select_mode(ItemList::SELECT_MULTI); layout_names->set_allow_rmb_select(true); layout_names->connect("multi_selected", callable_mp(this, &EditorLayoutsDialog::_update_ok_disable_state).unbind(2)); + MarginContainer *mc = makevb->add_margin_child(TTR("Select existing layout:"), layout_names); + mc->set_v_size_flags(Control::SIZE_EXPAND_FILL); name = memnew(LineEdit); makevb->add_child(name); |