EditorNameDialog: Fix margins

Somehow the previous code is what works in *master*, though it looks buggy.
For 2.1, the margins should be set on the container itself.
This commit is contained in:
Rémi Verschelde 2017-07-02 13:16:39 +02:00
parent 5a6eaf5a55
commit 37eaa9d792

View File

@ -80,11 +80,12 @@ void EditorNameDialog::_bind_methods() {
EditorNameDialog::EditorNameDialog() {
makevb = memnew(VBoxContainer);
makevb->set_margin(MARGIN_TOP, 5);
makevb->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5);
makevb->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 5);
add_child(makevb);
name = memnew(LineEdit);
makevb->add_child(name);
name->set_margin(MARGIN_TOP, 5);
name->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5);
name->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 5);
name->connect("input_event", this, "_line_input_event");
}