Fix placement of ColorPicker in the editor

This commit is contained in:
Yuri Rubinsky 2024-05-09 14:46:58 +03:00
parent c4279fe3e0
commit 1fd1adc285
2 changed files with 4 additions and 4 deletions

View File

@ -243,8 +243,8 @@ Size2 BoxContainer::get_minimum_size() const {
bool first = true; bool first = true;
for (int i = 0; i < get_child_count(); i++) { for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i)); Control *c = Object::cast_to<Control>(get_child(i));
if (!c) { if (!c || !c->is_visible() || c->is_set_as_top_level()) {
continue; continue;
} }

View File

@ -36,8 +36,8 @@ Size2 MarginContainer::get_minimum_size() const {
Size2 max; Size2 max;
for (int i = 0; i < get_child_count(); i++) { for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i)); Control *c = Object::cast_to<Control>(get_child(i));
if (!c) { if (!c || !c->is_visible() || c->is_set_as_top_level()) {
continue; continue;
} }