summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-08-26 15:53:26 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-08-26 15:57:17 +0200
commitecfff5b75e175a34cf891b4e0547ab761f212d44 (patch)
treec235e5e9205956b32b8e40baa58e5ecc96551c3f /scene/gui
parentc8ef12a03a81c931480be41739ba5789415c4675 (diff)
Revert SplitContainer minimum size splitting changes (#64676 and #64800)
This reverts commits 185b1a5bd333c5e75da5219e66cb759b5e6c3684 and 19ad31b89fc293cbd3c826b4dab6140b65895121. The original PR and its fixup still had regressions, so we're going back to the drawing board to reattempt fixing #43749. Fixes #64785. Fixes #64851. Fixes #64866.
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/split_container.cpp6
-rw-r--r--scene/gui/split_container.h1
2 files changed, 1 insertions, 6 deletions
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index b6073ce265..3e60db0846 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -97,16 +97,12 @@ void SplitContainer::_resort() {
// Compute the final middle separation.
middle_sep = no_offset_middle_sep;
- if (prev_no_offset_middle_sep != INT_MAX) {
- split_offset -= middle_sep - prev_no_offset_middle_sep;
- }
- prev_no_offset_middle_sep = middle_sep;
-
if (!collapsed) {
int clamped_split_offset = CLAMP(split_offset, ms_first[axis] - no_offset_middle_sep, (get_size()[axis] - ms_second[axis] - sep) - no_offset_middle_sep);
middle_sep += clamped_split_offset;
if (should_clamp_split_offset) {
split_offset = clamped_split_offset;
+
should_clamp_split_offset = false;
}
}
diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h
index dd15362199..a69ffe4de9 100644
--- a/scene/gui/split_container.h
+++ b/scene/gui/split_container.h
@@ -47,7 +47,6 @@ private:
bool should_clamp_split_offset = false;
int split_offset = 0;
int middle_sep = 0;
- int prev_no_offset_middle_sep = INT_MAX;
bool vertical = false;
bool dragging = false;
int drag_from = 0;