-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Add visibility mode to as_sortable_control()
#92664
Add visibility mode to as_sortable_control()
#92664
Conversation
I was thinking instead of having modes, have an Also, missing some Containers like ScrollContainer, AspectRatioContainer, CenterContainer, GraphFrame, FlowContainer, and GridContainer. |
3274d1e
to
a15564f
Compare
For now I only fixed PanelContainer issue, other changes are bonus refactoring. I tried to keep the current behavior (TabContainer change was an oversight), any other improvement can be done later. |
a15564f
to
02e1e6d
Compare
Now it does. |
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.
LGTM, all the get_child
cases match cleanly and code looks good
Thanks! |
as_sortable_control()
as_sortable_control()
as_sortable_control()
introduced more problems than it's worth it tbh, most of which come from unifying what's considered a sortable child to always useis_visible_tree()
. This PR breaks the unification by introducing visibility mode to this method. By default it checks foris_visible_in_tree()
, but it can beis_visible()
or no visibility check, depending on needs. This allows to apply it in some classes that couldn't use it before.Fixes #92618
Fixes https://chat.godotengine.org/channel/gui?msg=dmJWbcbv5amvaLMi9
Fixes #92812 (not tested)
(this time it was PanelContainer)
EDIT:
Also ScrollContainer: Fixes #92614 Supersedes #92714
Alternatives are making sure that containers don't break when using
is_visible_in_tree()
(unlikely, given how Control sizing is unsolved Godot problem since forever), or reverting #91613.