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

Collapse Resource Preview Properly #43155

Merged

Conversation

nathanfranke
Copy link
Contributor

Previously, cleared resources in the inspector do not reset the size taken by the preview, leading to an unusually large control.
image

This PR fixes the bug by setting the minsize to zero as would be done in _resource_preview

@Calinou Calinou added bug cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:editor labels Oct 28, 2020
@Calinou Calinou added this to the 4.0 milestone Oct 28, 2020
@KiritoAM
Copy link
Contributor

the change looks fine to me, but I'm wondering whether it would be better to use the minimum size of the specific widget type (wondering the same for _resource_preview):
assign->set_custom_minimum_size(assign->get_minimum_size());

@akien-mga akien-mga merged commit 54a690e into godotengine:master Mar 31, 2021
@akien-mga
Copy link
Member

Thanks!

@nathanfranke nathanfranke deleted the collapse-resource-preview branch April 2, 2021 06:58
@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Apr 26, 2021
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.

None yet

4 participants