-
-
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
Popup containing an auto-wrap label opens too tall #47005
Comments
I can reproduce the problem in 3.2.3 stable but can't in 4.0 |
For the next person to hit this: Set the dialog's text to "\n" (or maybe the empty string?) before you pop it up. Then, once you've popped it up, set the text to the text you want. That seems to work. |
This is still the case for MRP: wrap.zip |
The only difference between the two is how many buttons they have. So the issue is likely valid for both, but maybe confirm accidentally causes an extra update, or something like that. |
Some issues slightly related to similar problems exist, but they were worked around by turning off autowrap instead of actually fixing the problem with it.
Godot version:
Godot 3.2.3, Godot 3.2.4
OS/device including version:
Windows 10 64 bits
Issue description:
I have an
AcceptDialog
with aVBoxContainer
inside. I added a label with some description text inside, and enabledautowrap
so it fits inside the dialog.Controls have the correct width when the popup opens, but no matter which sequence of setup I use, it always opens with a crazy high vertical size:
Steps to reproduce:
I do this in a module, so this is the code I used to reproduce it in GDScript:
Minimal reproduction project:
PopupWithAutowrapLabel.zip
I suspect the reason is because at some point, controls get sorted in a state where the label is given a width of zero, making it become very tall to fit each letter in one column. I tried to workaround this by giving controls an initial size, and gave the popup a minimum size, to no avail.
The text was updated successfully, but these errors were encountered: