summaryrefslogtreecommitdiffstats
path: root/scene/gui/split_container.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/split_container.cpp')
-rw-r--r--scene/gui/split_container.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index 06b32b548f..5f4586a6d5 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -39,7 +39,7 @@ void SplitContainerDragger::gui_input(const Ref<InputEvent> &p_event) {
SplitContainer *sc = Object::cast_to<SplitContainer>(get_parent());
- if (sc->collapsed || !sc->_getch(0) || !sc->_getch(1) || sc->dragger_visibility != SplitContainer::DRAGGER_VISIBLE) {
+ if (sc->collapsed || !sc->get_containable_child(0) || !sc->get_containable_child(1) || sc->dragger_visibility != SplitContainer::DRAGGER_VISIBLE) {
return;
}
@@ -122,7 +122,7 @@ void SplitContainerDragger::_notification(int p_what) {
}
}
-Control *SplitContainer::_getch(int p_idx) const {
+Control *SplitContainer::get_containable_child(int p_idx) const {
int idx = 0;
for (int i = 0; i < get_child_count(false); i++) {
@@ -157,8 +157,8 @@ Ref<Texture2D> SplitContainer::_get_grabber_icon() const {
}
void SplitContainer::_compute_middle_sep(bool p_clamp) {
- Control *first = _getch(0);
- Control *second = _getch(1);
+ Control *first = get_containable_child(0);
+ Control *second = get_containable_child(1);
// Determine expanded children.
bool first_expanded = (vertical ? first->get_v_size_flags() : first->get_h_size_flags()) & SIZE_EXPAND;
@@ -199,8 +199,8 @@ void SplitContainer::_compute_middle_sep(bool p_clamp) {
}
void SplitContainer::_resort() {
- Control *first = _getch(0);
- Control *second = _getch(1);
+ Control *first = get_containable_child(0);
+ Control *second = get_containable_child(1);
// If we have only one element.
if (!first || !second) {
@@ -261,7 +261,7 @@ Size2 SplitContainer::get_minimum_size() const {
int sep = (dragger_visibility != DRAGGER_HIDDEN_COLLAPSED) ? MAX(theme_cache.separation, vertical ? g->get_height() : g->get_width()) : 0;
for (int i = 0; i < 2; i++) {
- if (!_getch(i)) {
+ if (!get_containable_child(i)) {
break;
}
@@ -273,7 +273,7 @@ Size2 SplitContainer::get_minimum_size() const {
}
}
- Size2 ms = _getch(i)->get_combined_minimum_size();
+ Size2 ms = get_containable_child(i)->get_combined_minimum_size();
if (vertical) {
minimum.height += ms.height;
@@ -325,7 +325,7 @@ int SplitContainer::get_split_offset() const {
}
void SplitContainer::clamp_split_offset() {
- if (!_getch(0) || !_getch(1)) {
+ if (!get_containable_child(0) || !get_containable_child(1)) {
return;
}