From 815e9059722a039cea57e0420eff8a793fee017a Mon Sep 17 00:00:00 2001 From: Janis Kirsteins Date: Sun, 19 Jan 2025 00:33:39 +0100 Subject: [PATCH] Typo fix: rename SortableVisbilityMode --- scene/gui/aspect_ratio_container.cpp | 2 +- scene/gui/box_container.cpp | 2 +- scene/gui/center_container.cpp | 2 +- scene/gui/container.cpp | 6 +++--- scene/gui/container.h | 4 ++-- scene/gui/flow_container.cpp | 2 +- scene/gui/graph_element.cpp | 2 +- scene/gui/graph_node.cpp | 4 ++-- scene/gui/grid_container.cpp | 2 +- scene/gui/margin_container.cpp | 2 +- scene/gui/panel_container.cpp | 2 +- scene/gui/scroll_container.cpp | 4 ++-- scene/gui/split_container.cpp | 4 ++-- scene/gui/split_container.h | 2 +- scene/gui/tab_container.cpp | 8 ++++---- 15 files changed, 24 insertions(+), 24 deletions(-) diff --git a/scene/gui/aspect_ratio_container.cpp b/scene/gui/aspect_ratio_container.cpp index e9c178e4234..d012268e418 100644 --- a/scene/gui/aspect_ratio_container.cpp +++ b/scene/gui/aspect_ratio_container.cpp @@ -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; } diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp index b7db730b494..557e71dd810 100644 --- a/scene/gui/box_container.cpp +++ b/scene/gui/box_container.cpp @@ -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; } diff --git a/scene/gui/center_container.cpp b/scene/gui/center_container.cpp index 5dc336ceb57..13771ee3913 100644 --- a/scene/gui/center_container.cpp +++ b/scene/gui/center_container.cpp @@ -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; } diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp index e867fceaf26..eb69b2dfb8b 100644 --- a/scene/gui/container.cpp +++ b/scene/gui/container.cpp @@ -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(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; diff --git a/scene/gui/container.h b/scene/gui/container.h index 0561d0d219c..1581898ae43 100644 --- a/scene/gui/container.h +++ b/scene/gui/container.h @@ -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; diff --git a/scene/gui/flow_container.cpp b/scene/gui/flow_container.cpp index 90d5b6b36d4..659a8ad7dac 100644 --- a/scene/gui/flow_container.cpp +++ b/scene/gui/flow_container.cpp @@ -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; } diff --git a/scene/gui/graph_element.cpp b/scene/gui/graph_element.cpp index 878a1313687..7abefee974f 100644 --- a/scene/gui/graph_element.cpp +++ b/scene/gui/graph_element.cpp @@ -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; } diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index e52a771c30d..0ca32de0ad5 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -129,7 +129,7 @@ bool GraphNode::_get(const StringName &p_name, Variant &r_ret) const { void GraphNode::_get_property_list(List *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; } diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index 5f04acf643a..0fdca084895 100644 --- a/scene/gui/grid_container.cpp +++ b/scene/gui/grid_container.cpp @@ -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; } diff --git a/scene/gui/margin_container.cpp b/scene/gui/margin_container.cpp index a47b131708e..535db650f09 100644 --- a/scene/gui/margin_container.cpp +++ b/scene/gui/margin_container.cpp @@ -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; } diff --git a/scene/gui/panel_container.cpp b/scene/gui/panel_container.cpp index 2c39e148a0d..6196310b559 100644 --- a/scene/gui/panel_container.cpp +++ b/scene/gui/panel_container.cpp @@ -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; } diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index f3c50c626c1..a7d7e047354 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -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; } diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp index fed66405f65..78d7fea9bbf 100644 --- a/scene/gui/split_container.cpp +++ b/scene/gui/split_container.cpp @@ -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; } diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h index 2bba96b4b8f..275996256a2 100644 --- a/scene/gui/split_container.h +++ b/scene/gui/split_container.h @@ -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; diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 33e72428cfb..8dd49277d1e 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -365,7 +365,7 @@ void TabContainer::_on_mouse_exited() { Vector TabContainer::_get_tab_controls() const { Vector 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; }