-
-
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
Allow SplitContainer to have a grab area larger than its visual grabber #65355
Allow SplitContainer to have a grab area larger than its visual grabber #65355
Conversation
2562618
to
c779db1
Compare
Does this implement godotengine/godot-proposals#3635? :) |
Yeah, I guess it does to some extend. You cannot have the same blue line on the whole width, but the borderless aspect is implemented by this PR, yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved in PR review meeting (pending edit suggested by Yuri).
c779db1
to
33e0e1a
Compare
You need to update the class reference to include the new theme properties (and ideally give them a description). |
33e0e1a
to
3a5ebb6
Compare
3a5ebb6
to
4cbcb5a
Compare
Thanks! |
This is a great improvement. I have a scripted version of this with this same approach, but additionally does everything in https://github.com/godotengine/godot-proposals/issues/3635. Here is what remains to be added to make this fully implement the issue:
It is essential to be able to set a custom size of the dragger Control in the axis of the split line, i.e. top/bottom "margins", as you can do some nifty GUI tricks with that. |
Another nice trick you can do if you have the SplitContainerDragger, is add a button that rides on the split line. For example, an arrow icon that moves items between sides of the split. |
In number 2) above, I am referring to saving/restoring the |
Sometimes in a SplitContainer, you would want a thin visible grabber, or possibly no visible grabber image at all (for a borderless split). But with the current implementation, the grabbing area is dependent on the texture width and the "sep" theme variable, so with no texture and a "sep" of zero, the grabbing area becomes too thin and thus hard/impossible to grab.
This PR allows you, via a theme constant, to have a grabbing area width of at least X pixels. It is implemented by adding an internal Control node on top of the two children nodes.
Here is an example with a borderless editor test:
Peek.05-09-2022.11-47.mp4
Closes godotengine/godot-proposals#3635