Skip to content
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

Fix container minimum size with hidden parent #94085

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

anniryynanen
Copy link
Contributor

Fixes #93464.

MRP for testing the changed containers: container-visibility.zip

The minimum size bug can be a bit fickle to reproduce. In the above MRP, if you change the position of a panel by 1 px it stops reproducing until the inner ColorRect's size is reset, the panel's size is reset, and the ColorRect's size is set again.

Graphs and TabContainer use SortableVisbilityMode::IGNORE, I didn't change that as they seem like special cases.

@anniryynanen
Copy link
Contributor Author

EditorInspector also uses as_sortable_control() in get_minimum_size() for EditorProperty and EditorInspectorSection. I didn't add SortableVisbilityMode::VISIBLE there as I'm not sure if the bug reproduces there, or how I'd go about testing it.

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

Half of the containers already use VISIBLE mode, so this makes sense.

@akien-mga akien-mga merged commit 78120c6 into godotengine:master Jul 17, 2024
18 checks passed
@anniryynanen anniryynanen deleted the min-size-hidden-parent branch July 17, 2024 10:05
@akien-mga
Copy link
Member

Thanks!

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.

Containers do not correctly resize to their contents when their visibility is toggled
4 participants