mirror of
https://github.com/godotengine/godot.git
synced 2024-11-13 07:32:55 +00:00
Improve SplitContainer minimum size splitting
This commit is contained in:
parent
0c5f254956
commit
185b1a5bd3
@ -98,11 +98,10 @@ void SplitContainer::_resort() {
|
||||
// Compute the final middle separation
|
||||
middle_sep = no_offset_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;
|
||||
int clamped_split_offset = CLAMP(split_offset, ms_first[axis] - no_offset_middle_sep, get_size()[axis] - ms_second[axis] - sep);
|
||||
middle_sep = MAX(middle_sep, clamped_split_offset);
|
||||
if (should_clamp_split_offset) {
|
||||
split_offset = clamped_split_offset;
|
||||
|
||||
should_clamp_split_offset = false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user