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

The grow_direction horizontal/vertical properties are not present anymore #58857

Closed
groud opened this issue Mar 7, 2022 · 5 comments
Closed
Labels

Comments

@groud
Copy link
Member

groud commented Mar 7, 2022

Godot version

4.0

System information

v4.0.alpha.custom_build [73f92a6]

Issue description

The grow_direction properties, which controls in which way a Control expands when its size is modified is not editable anymore in the inspector:
2022-03-07-114648_620x1123_scrot

Steps to reproduce

Create a control node, then edit it.

Minimal reproduction project

No response

@groud
Copy link
Member Author

groud commented Mar 7, 2022

cc @pycbouh

@YuriSizov
Copy link
Contributor

It's hidden on purpose. @reduz wanted it to be controlled by the anchor preset, automatically changing with it to give the user the most expected behavior out of the box. Which is why it is only editable with the custom preset.

@groud
Copy link
Member Author

groud commented Mar 7, 2022

Oh, got it! The grow direction is within the Custom mode of the Anchor Preset.
This should be changed. I definitely need to be able to set the grow direction to center when using the center anchor preset.
I'll make a PR to move it out of the menu.

@groud
Copy link
Member Author

groud commented Mar 7, 2022

It's hidden on purpose. @reduz wanted it to be controlled by the anchor preset, automatically changing with it to give the user the most expected behavior out of the box. Which is why it is only editable with the custom preset.

Yeah, I figured that out. Sadly, until we implement the grow_direction computed out of the anchors values (this might require a proposal, as we might need to override this default behavior, I am not sure), we need access to grow_direction properties with other presets.

I'll make a PR as a quick fix, but I agree we should discuss the implementation of the computation of grow_direction out of anchors.

Edit: Or maybe I misunderstood something? Because if your message suggests it is implemented, then the default value for the center preset should be to set both the horizontal and vertical grow_direction to center. In such case, that might be the bug I have.

Edit 2: Ah... Seems like I cannot reproduce the bug, and that the grow direction is indeed set correctly. I don't know, there might be a situation where the grow_direction is not set right away ? That's weird.

@groud
Copy link
Member Author

groud commented Mar 7, 2022

Anyway, closing this as the original situation is expected. I'll if I am able to reproduce the bug again, I'll open another issue.

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

No branches or pull requests

2 participants