Skip to content

SplitContainer drag nested intersections#116734

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
kitbdev:sc-drag-nested-intersection
Mar 6, 2026
Merged

SplitContainer drag nested intersections#116734
Repiteo merged 1 commit intogodotengine:masterfrom
kitbdev:sc-drag-nested-intersection

Conversation

@kitbdev
Copy link
Contributor

@kitbdev kitbdev commented Feb 24, 2026

Adds drag_nested_intersections to SplitContainer. It needs to be enabled on the ancestor and the descendant SplitContainer for them to recognize each other. It adds a dragger at the intersection of their draggers, the child of the ancestor SplitContainer's dragger that it is next to. They must be adjacent to each other as well, within minimum_grab_thickness.
The descendant should update the ancestor whenever it needs to update, usually on sort. There is one case where the ancestor needs to update all of its descendants, but it only happens when the property is just enabled and already in the tree, so it shouldn't be a performance concern.
I enabled this in the editor for the docks and for SplitContainers that can make use of this, like in the ScriptEditor.

drag-intersection-demo.mp4

@kitbdev kitbdev force-pushed the sc-drag-nested-intersection branch from d426ddf to c26d122 Compare February 25, 2026 18:48
Copy link
Contributor

@ryevdokimov ryevdokimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works, code looks fine to me.

2026-03-04.21-41-06.mp4

@Repiteo
Copy link
Contributor

Repiteo commented Mar 5, 2026

Needs rebase

@kitbdev kitbdev force-pushed the sc-drag-nested-intersection branch from c26d122 to 339bc4f Compare March 5, 2026 16:30
@Repiteo Repiteo modified the milestones: 4.x, 4.7 Mar 6, 2026
@Repiteo Repiteo merged commit 9383697 into godotengine:master Mar 6, 2026
26 of 27 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Mar 6, 2026

Thanks!

@kitbdev kitbdev deleted the sc-drag-nested-intersection branch March 6, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drag nested SplitContainers at intersection

4 participants