From 18d01932bd320fa00a30a67104a467d6723f8e33 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Tue, 22 Oct 2024 23:32:47 -0400 Subject: [PATCH] Remove superfluous `ColorPicker` Containers Remove vbl child from `ColorPicker` Remove vbr child from `ColorPicker`, prefer `real_vbox` (cherry picked from commit blazium-engine/blazium@f7c6762df94867d93465612ec6be86b28593dc47) Co-authored-by: Mounir Tohami <53877170+WhalesState@users.noreply.github.com> --- scene/gui/color_picker.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index d4e40e284f5..dbeb6c6eb76 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -1911,17 +1911,10 @@ ColorPicker::ColorPicker() { mode_popup->set_item_checked(current_mode, true); mode_popup->set_item_checked(MODE_MAX + 1, true); mode_popup->connect(SceneStringName(id_pressed), callable_mp(this, &ColorPicker::_set_mode_popup_value)); - VBoxContainer *vbl = memnew(VBoxContainer); - real_vbox->add_child(vbl); - - VBoxContainer *vbr = memnew(VBoxContainer); - - real_vbox->add_child(vbr); - vbr->set_h_size_flags(SIZE_EXPAND_FILL); slider_gc = memnew(GridContainer); - vbr->add_child(slider_gc); + real_vbox->add_child(slider_gc); slider_gc->set_h_size_flags(SIZE_EXPAND_FILL); slider_gc->set_columns(3); @@ -1933,7 +1926,7 @@ ColorPicker::ColorPicker() { hex_hbc = memnew(HBoxContainer); hex_hbc->set_alignment(ALIGNMENT_BEGIN); - vbr->add_child(hex_hbc); + real_vbox->add_child(hex_hbc); hex_hbc->add_child(memnew(Label("Hex")));