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 GridContainer minimum size when there's a hidden parent #93386

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

anniryynanen
Copy link
Contributor

When calculating minimum size, GridContainer only looks at children that are returned from as_sortable_control(). That defaults to only showing children visible in the tree, so if the grid has a hidden parent the minimum size becomes (0, 0).

After this change only the child itself needs to be visible, making GridContainer::get_minimum_size() behave the same way as other controls.

Fixes #91722.

When calculating minimum size, GridContainer only looks at children that are
returned from `as_sortable_control()`. That defaults to only showing children
visible in the tree, so if the grid has a hidden parent the minimum size
becomes (0, 0).

After this change only the child itself needs to be visible, making
`GridContainer::get_minimum_size()` behave the same way as other controls.

Fixes godotengine#91722.
@anniryynanen anniryynanen requested a review from a team as a code owner June 20, 2024 10:50
@Chaosus Chaosus added this to the 4.3 milestone Jun 20, 2024
@Chaosus Chaosus requested a review from KoBeWi June 20, 2024 10:55
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.

I wonder if we should just use VISIBLE in every get_minimum_size().

@akien-mga akien-mga merged commit 9de7856 into godotengine:master Jun 20, 2024
16 checks passed
@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.

Opening a Color picker in the inspector places it outside the display border
4 participants