Skip to content

Commit

Permalink
Remove superfluous ColorPicker Containers
Browse files Browse the repository at this point in the history
Remove vbl child from `ColorPicker`
Remove vbr child from `ColorPickedr`, prefer real_vbox

(cherry picked from commit blazium-engine/blazium@f7c6762)

Co-authored-by: Mounir Tohami <53877170+WhalesState@users.noreply.github.com>
  • Loading branch information
Spartan322 and WhalesState committed Oct 23, 2024
1 parent 3a91796 commit 89b7fd9
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions scene/gui/color_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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")));

Expand Down

0 comments on commit 89b7fd9

Please sign in to comment.