-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Editor dock resizing consistent #83359
base: master
Are you sure you want to change the base?
Conversation
2dfcbf9
to
d036d9b
Compare
354ad72
to
c17921e
Compare
c17921e
to
0fa5f24
Compare
0fa5f24
to
ffc250f
Compare
f1e1ab1
to
6a30364
Compare
Rebased After: I could have this for the File Dialog when there are three panels, like the export scene to gLTF, but its not as much of a problem there. Changed it to not emit the |
This seems to be working correctly in the editor, but the SplitContainer changes are rather complex. |
6a30364
to
3382981
Compare
3382981
to
c6dc192
Compare
The issue with the nested second SplitContainer moving strangely when clamping was caused by the children updating their splits and minimum sizes before the parent was resorted. It should be fixed now, I made sure that sorting happens before resizing child splits. This meant I could also remove a workaround I had in rtl mode. |
Something still seems not right 🤔 godot.windows.editor.dev.x86_64_XFBOfVMS3F.mp4Same setup as before, both have |
Thanks for the contribution! Sooooo, from a quick look the API seems a bit convoluted and a bit confusing IMO. |
Allowing more than two children would work for the current system, but if the layout was changed to be any more complex then it wouldn't. For example, it wouldn't work for a layout like: (godotengine/godot-proposals#4565) or other dock customization proposals with functionality like: Also using SplitContainer with multiple children would probably break compatibility with dock layouts, since the split offset(s) may need to be different. That said, this implementation is pretty complex and I would like it to be simpler.
I found a fix for this, but I found an another issue where the nested SplitContainer isn't being resized separately. |
Hmm I am not sure why it would not. Like, it would work 99% of the time anyway. The only thing I'd say cannot be solved would likely be a "smaller separator" (like those in the top left), pushing a bigger one (on the right of your mockup). But it seems prettyh doable to me.
That's not a big issue, the TileMap node already does it by using a special setter (in the |
I'm in favor of adapting SplitContainer to handle multiple children; it's something I've wanted to implement for a long time but never got to it. |
SplitContainer
with multiple children would have.SplitContainer
andpush_parent
is setWhen adjusting the split between docks it will now only adjust the areas to the immediate sides of it, unless the minimum size is reached, then it affects the next area over until it cannot move anymore.
Implementation details:
Added
push_parent
bool inSplitContainer
SplitContainer
s so that dragging can continue in them.dragged
signal in the parent.Added
resize_separately
bool inSplitContainer
push_parent
is false, resizing does move past the opposite split, even if could otherwise.Also fixed dragging not stopping when focus is lost, and dragging while in a moving SplitContainer that has its child's size flag set.
With only
resize_separately
theSplitContainer
s work like Blender's dock system does when moving splits.With both
push_ancestors
andresize_separately
enabled, theSplitContainer
hierarchy works together to have a better experience when resizing.edit: fixed minimum size not handled correctly
edit: fixed rtl layout, scaling issue, dragging with both expand flags set, and other problems