Improvements to SplitContainer including a drag bar background StyleBox - #72680
Conversation
27eaf38 to
6848051
Compare
6848051 to
dd8e5d9
Compare
|
That's a lot. It needs a proposal, or several, to explain various enhancements. Probably better done as several PRs too, but that would be more obvious after the proposals. |
|
Okay. I’ll put the proposal together and follow up as necessary.
… On Feb 3, 2023, at 2:13 PM, Yuri Sizov ***@***.***> wrote:
That's a lot. It needs a proposal, or several, to explain various enhancements. Probably better done as several PRs too, but that would be more obvious after the proposals.
—
Reply to this email directly, view it on GitHub <#72680 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIDFM5F5VVVVTRXIMFRQZWDWVVRG7ANCNFSM6AAAAAAUQR3F4M>.
You are receiving this because you authored the thread.
|
|
Needs rebase.
You can also connect |
I just tried these, and If there are still issues with the |
Yeah right now the signal is not needed for anything. It's also inconsistent with other containers which don't expose anything like this. |
dd8e5d9 to
0607c60
Compare
|
This push included a rebase and removed the |
dc48cd1 to
d661619
Compare
Can you show an example when this is useful? The child nodes of SplitContainer can't be shrunk past their minimum size, so it's impossible to overlap scrollbars and drag area.
Isn't
Which video?
Shouldn't this be editor-only? Also the double |
This comment was marked as resolved.
This comment was marked as resolved.
|
Sorry for the delay following up. |
Sounds good. I will take care of the conflicts shortly. |
2cce2aa to
8ae0b1f
Compare
|
In reference to #90411, there is quite a bit of overlapping effort (and similar thinking) in cleaning up |
CC @kitbdev |
|
I don't think there is much overlap in cleaning up SplitContainer, besides some minor doc issues. #90411 just needs to touch a lot of things due to logic changes. Where they do clean up, they clean up different things like #90411 needs some fixes to properly handle changing child visibility, so it isn't ready yet, and I don't want to hold up other PRs. |
f9946ba to
40e25ad
Compare
Thanks for offering to rebase on top of this. I did put the draw back into the dragger, and I see now why it needs to be there so you can have multiple dragger instances with more than two children. Each dragger now also saves its stylebox |
0c76e98 to
ca935ff
Compare
319f82b to
20b6755
Compare
20b6755 to
f7005de
Compare
|
Thanks! |
…ovements Improvements to SplitContainer including a drag bar background StyleBox
…ovements Improvements to SplitContainer including a drag bar background StyleBox
Improves
SplitContainerin a number of ways making it much easier to script, and tidies up the code as follows:split_bar_backgroundStyleBoxallows solid color, gradients or textures to fill in the split bar behind or in place of the grabber icon.drag_area_scrollbar_offsetis required if one of the child controls has a scrollbar or other selectable control up against the split bar, in order to prevent the drag area from blocking mouse selection of the scroll bar or control.drag_startedanddrag_releasedmake it easier to script saving and restoring thesplit_offsetdragging_enabledseparates dragging fromdragger_visibilityso the appearance of the drag bar is independent from whether dragging is enabled or not.get_drag_area_controlreturns theControlso buttons or any other type ofControlcan ride along with the split bar (see demo video below).drag_area_margin_beginanddrag_area_margin_endallow for scripting the long-axis size of the drag area and background, which makes some nice uses like drawers simple to script (see video below).drag_area_highlight_in_editorproperty allows you to see the drag area during development.- A new virtual method_splits_ready()with a corresponding signal so a script knows when the split container children have been resized after the initial sort. This was a big problem because formerly,SplitContainer._ready()was called before the children had been fit to the container, and there was no easy way to get that information.This PR also fixes this issue and adds the theme fix: #71862 and #71861
Adds this enhancement #61534
Screen.Recording.2023-02-03.at.12.29.31.PM.mov
This is all the GDScript neccessary for the buttons:
Screen.Recording.2023-02-03.at.12.36.25.PM.mov
Screen.Recording.2023-02-03.at.12.40.10.PM.mov
Here's the editor with the drag areas visible:
Screen.Recording.2023-02-03.at.12.58.21.PM.mov
Production edit: Closes #61534, closes godotengine/godot-proposals#6230 and closes godotengine/godot-proposals#6231.