Merge pull request #55797 from KoBeWi/internal_shenanigans

This commit is contained in:
Rémi Verschelde 2021-12-10 18:55:20 +01:00 committed by GitHub
commit 9ef6b5c104
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -351,11 +351,11 @@ MarginContainer *VBoxContainer::add_margin_child(const String &p_label, Control
Label *l = memnew(Label);
l->set_theme_type_variation("HeaderSmall");
l->set_text(p_label);
add_child(l, false, INTERNAL_MODE_FRONT);
add_child(l);
MarginContainer *mc = memnew(MarginContainer);
mc->add_theme_constant_override("margin_left", 0);
mc->add_child(p_control, true);
add_child(mc, false, INTERNAL_MODE_FRONT);
add_child(mc);
if (p_expand) {
mc->set_v_size_flags(SIZE_EXPAND_FILL);
}