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

Containers do not correctly resize to their contents when their visibility is toggled #93464

Closed
peter-rocchio opened this issue Jun 22, 2024 · 4 comments · Fixed by #94085
Closed

Comments

@peter-rocchio
Copy link

Tested versions

  • Reproducible in: v4.3.beta2.official [b75f048] and earlier betas
  • Not Reproducible in: v4.2.2.stable.official [15073af] and earlier 4.2

System information

Windows 11 - Forward +

Issue description

Containers will correctly resize to fit their contents when in the editor and the first time they are made visible while the application is running. However, if the container is hidden, and then shown again, the container will shrink and not resize properly when shown again. This is easiest to see with panel containers.
image
image
image

Steps to reproduce

  1. Create a control scene and add a script to this node
  2. Add a panel container, a grid container as a child, and buttons as children to the grid container
  3. Add a button as the child of the root control node, link its pressed signal to the root script
  4. Have the button's signal turn the panel container's visibility on and off
  5. Observe that the panel container does not consider its child contents when it determines its size after being shown again

Minimal reproduction project (MRP)

container-visibility.zip

@anniryynanen
Copy link
Contributor

Probably related to #93386. That fixes it for grids, but not other containers.

@anniryynanen
Copy link
Contributor

I can change the other containers too, but should it be SortableVisbilityMode::VISIBLE or SortableVisbilityMode::IGNORE? I used VISIBLE to fix the grids, but going through the others I see some use IGNORE.

@huwpascoe
Copy link
Contributor

This happens to me in 4.2. I know there was some kind of workaround I had to do for an overlay.

@kitbdev
Copy link
Contributor

kitbdev commented Jul 8, 2024

I can change the other containers too, but should it be SortableVisbilityMode::VISIBLE or SortableVisbilityMode::IGNORE? I used VISIBLE to fix the grids, but going through the others I see some use IGNORE.

I think they should use VISIBLE in the minimum size checks so that it matches behavior from before #91613

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants