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
Control size changes after changing its type to a subtype #78779
Comments
I can confirm this on v4.1.beta.custom_build 3aaa787 (Linux). Note that it appears pretty flaky: if you resize the editor window after changing type, the control's size will change back to its original size. The exact size that appears temporarily can also vary, and undo/redo can mess it up too. Also, this doesn't occur with all controls – for instance, switching from Control to HSlider won't exhibit this issue. |
I tried looking into this issue but couldn't figure out what causes it. Here are some of the things I found in case someone finds them helpful: Selecting the same type of node when switching, e.g. from a There's this function gets called during the resize: Line 648 in 4438206
In this section of it the rect that will be used as the base to calculate the new node's size is determined: if (scene_root_parent && get_viewport() == scene_root_parent->get_viewport()) {
parent_rect.size = Size2(GLOBAL_GET("display/window/size/viewport_width"), GLOBAL_GET("display/window/size/viewport_height"));
} else {
parent_rect = get_viewport()->get_visible_rect();
} While the |
Godot version
v4.0.3.stable.official [5222a99]
System information
Windows 10 - Godot v4.0.3stable
Issue description
If a root
Control
node's type is changed to aControl
subtype, its size will change as well.Steps to reproduce
User Interface
sceneVBoxContainer
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: