Merge pull request #101780 from jkirsteins/janiskirsteins/fix-typo-visbility-mode

Typo fix: rename SortableVisbilityMode
This commit is contained in:
Thaddeus Crews 2025-01-20 10:05:23 -06:00
commit 916d068e40
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84
15 changed files with 24 additions and 24 deletions

View file

@ -35,7 +35,7 @@
Size2 AspectRatioContainer::get_minimum_size() const {
Size2 ms;
for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i), SortableVisbilityMode::VISIBLE);
Control *c = as_sortable_control(get_child(i), SortableVisibilityMode::VISIBLE);
if (!c) {
continue;
}

View file

@ -243,7 +243,7 @@ Size2 BoxContainer::get_minimum_size() const {
bool first = true;
for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i), SortableVisbilityMode::VISIBLE);
Control *c = as_sortable_control(get_child(i), SortableVisibilityMode::VISIBLE);
if (!c) {
continue;
}

View file

@ -36,7 +36,7 @@ Size2 CenterContainer::get_minimum_size() const {
}
Size2 ms;
for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i), SortableVisbilityMode::VISIBLE);
Control *c = as_sortable_control(get_child(i), SortableVisibilityMode::VISIBLE);
if (!c) {
continue;
}

View file

@ -140,15 +140,15 @@ void Container::queue_sort() {
pending_sort = true;
}
Control *Container::as_sortable_control(Node *p_node, SortableVisbilityMode p_visibility_mode) const {
Control *Container::as_sortable_control(Node *p_node, SortableVisibilityMode p_visibility_mode) const {
Control *c = Object::cast_to<Control>(p_node);
if (!c || c->is_set_as_top_level()) {
return nullptr;
}
if (p_visibility_mode == SortableVisbilityMode::VISIBLE && !c->is_visible()) {
if (p_visibility_mode == SortableVisibilityMode::VISIBLE && !c->is_visible()) {
return nullptr;
}
if (p_visibility_mode == SortableVisbilityMode::VISIBLE_IN_TREE && !c->is_visible_in_tree()) {
if (p_visibility_mode == SortableVisibilityMode::VISIBLE_IN_TREE && !c->is_visible_in_tree()) {
return nullptr;
}
return c;

View file

@ -41,14 +41,14 @@ class Container : public Control {
void _child_minsize_changed();
protected:
enum class SortableVisbilityMode {
enum class SortableVisibilityMode {
VISIBLE,
VISIBLE_IN_TREE,
IGNORE,
};
void queue_sort();
Control *as_sortable_control(Node *p_node, SortableVisbilityMode p_visibility_mode = SortableVisbilityMode::VISIBLE_IN_TREE) const;
Control *as_sortable_control(Node *p_node, SortableVisibilityMode p_visibility_mode = SortableVisibilityMode::VISIBLE_IN_TREE) const;
virtual void add_child_notify(Node *p_child) override;
virtual void move_child_notify(Node *p_child) override;

View file

@ -268,7 +268,7 @@ Size2 FlowContainer::get_minimum_size() const {
Size2i minimum;
for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i), SortableVisbilityMode::VISIBLE);
Control *c = as_sortable_control(get_child(i), SortableVisibilityMode::VISIBLE);
if (!c) {
continue;
}

View file

@ -59,7 +59,7 @@ void GraphElement::_resort() {
Size2 GraphElement::get_minimum_size() const {
Size2 minsize;
for (int i = 0; i < get_child_count(); i++) {
Control *child = as_sortable_control(get_child(i), SortableVisbilityMode::IGNORE);
Control *child = as_sortable_control(get_child(i), SortableVisibilityMode::IGNORE);
if (!child) {
continue;
}

View file

@ -129,7 +129,7 @@ bool GraphNode::_get(const StringName &p_name, Variant &r_ret) const {
void GraphNode::_get_property_list(List<PropertyInfo> *p_list) const {
int idx = 0;
for (int i = 0; i < get_child_count(false); i++) {
Control *child = as_sortable_control(get_child(i, false), SortableVisbilityMode::IGNORE);
Control *child = as_sortable_control(get_child(i, false), SortableVisibilityMode::IGNORE);
if (!child) {
continue;
}
@ -657,7 +657,7 @@ void GraphNode::_port_pos_update() {
int slot_index = 0;
for (int i = 0; i < get_child_count(false); i++) {
Control *child = as_sortable_control(get_child(i, false), SortableVisbilityMode::IGNORE);
Control *child = as_sortable_control(get_child(i, false), SortableVisibilityMode::IGNORE);
if (!child) {
continue;
}

View file

@ -279,7 +279,7 @@ Size2 GridContainer::get_minimum_size() const {
int valid_controls_index = 0;
for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i), SortableVisbilityMode::VISIBLE);
Control *c = as_sortable_control(get_child(i), SortableVisibilityMode::VISIBLE);
if (!c) {
continue;
}

View file

@ -36,7 +36,7 @@ Size2 MarginContainer::get_minimum_size() const {
Size2 max;
for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i), SortableVisbilityMode::VISIBLE);
Control *c = as_sortable_control(get_child(i), SortableVisibilityMode::VISIBLE);
if (!c) {
continue;
}

View file

@ -35,7 +35,7 @@
Size2 PanelContainer::get_minimum_size() const {
Size2 ms;
for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i), SortableVisbilityMode::VISIBLE);
Control *c = as_sortable_control(get_child(i), SortableVisibilityMode::VISIBLE);
if (!c) {
continue;
}

View file

@ -40,7 +40,7 @@ Size2 ScrollContainer::get_minimum_size() const {
largest_child_min_size = Size2();
for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i), SortableVisbilityMode::VISIBLE);
Control *c = as_sortable_control(get_child(i), SortableVisibilityMode::VISIBLE);
if (!c) {
continue;
}
@ -562,7 +562,7 @@ PackedStringArray ScrollContainer::get_configuration_warnings() const {
int found = 0;
for (int i = 0; i < get_child_count(); i++) {
Control *c = as_sortable_control(get_child(i), SortableVisbilityMode::VISIBLE);
Control *c = as_sortable_control(get_child(i), SortableVisibilityMode::VISIBLE);
if (!c) {
continue;
}

View file

@ -124,7 +124,7 @@ void SplitContainerDragger::_notification(int p_what) {
}
}
Control *SplitContainer::_get_sortable_child(int p_idx, SortableVisbilityMode p_visibility_mode) const {
Control *SplitContainer::_get_sortable_child(int p_idx, SortableVisibilityMode p_visibility_mode) const {
int idx = 0;
for (int i = 0; i < get_child_count(false); i++) {
Control *c = as_sortable_control(get_child(i, false), p_visibility_mode);
@ -257,7 +257,7 @@ Size2 SplitContainer::get_minimum_size() const {
int sep = _get_separation();
for (int i = 0; i < 2; i++) {
Control *child = _get_sortable_child(i, SortableVisbilityMode::VISIBLE);
Control *child = _get_sortable_child(i, SortableVisibilityMode::VISIBLE);
if (!child) {
break;
}

View file

@ -92,7 +92,7 @@ private:
void _compute_split_offset(bool p_clamp);
int _get_separation() const;
void _resort();
Control *_get_sortable_child(int p_idx, SortableVisbilityMode p_visibility_mode = SortableVisbilityMode::VISIBLE_IN_TREE) const;
Control *_get_sortable_child(int p_idx, SortableVisibilityMode p_visibility_mode = SortableVisibilityMode::VISIBLE_IN_TREE) const;
protected:
bool is_fixed = false;

View file

@ -365,7 +365,7 @@ void TabContainer::_on_mouse_exited() {
Vector<Control *> TabContainer::_get_tab_controls() const {
Vector<Control *> controls;
for (int i = 0; i < get_child_count(); i++) {
Control *control = as_sortable_control(get_child(i), SortableVisbilityMode::IGNORE);
Control *control = as_sortable_control(get_child(i), SortableVisibilityMode::IGNORE);
if (!control || control == tab_bar || children_removing.has(control)) {
continue;
}
@ -542,7 +542,7 @@ void TabContainer::add_child_notify(Node *p_child) {
return;
}
Control *c = as_sortable_control(p_child, SortableVisbilityMode::IGNORE);
Control *c = as_sortable_control(p_child, SortableVisibilityMode::IGNORE);
if (!c) {
return;
}
@ -572,7 +572,7 @@ void TabContainer::move_child_notify(Node *p_child) {
return;
}
Control *c = as_sortable_control(p_child, SortableVisbilityMode::IGNORE);
Control *c = as_sortable_control(p_child, SortableVisibilityMode::IGNORE);
if (c) {
tab_bar->move_tab(c->get_meta("_tab_index"), get_tab_idx_from_control(c));
}
@ -587,7 +587,7 @@ void TabContainer::remove_child_notify(Node *p_child) {
return;
}
Control *c = as_sortable_control(p_child, SortableVisbilityMode::IGNORE);
Control *c = as_sortable_control(p_child, SortableVisibilityMode::IGNORE);
if (!c) {
return;
}