-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Improve the anchors and margin workflow #27559
Conversation
I am wondering regarding the anchors whether it may be better to move them from the viewport to the inspector, and show a little box where you can drag them around as if it was the parent area. It may be more straightforward. This is now possible to do with editor plugins, it was not before. |
The thing is that having them in the viewport allows smart snapping the anchors. So in some situations it can be useful. |
Not sure what you call smart snapping, but I think its still kind of confusing in the viewport, because maybe for center, left and right is ok, but for the rest it's still really confusing.. also in general it's just confusing. |
When you have other nodes on the screen, the anchor automatically snaps on the same axis as those nodes (when you activate the option in the snap settings).
I kind of disagree. With your approach, the problem comes when you have anything but the standard values (left, right, center, etc...). Regarding what this PR tries to solve for example, keeping the child/parent size ratio requires settings the anchors at the border of the child node, which is a lot more readable on the viewport. Also, if you want to archor the child to a specific place in the parent (let's say, 22,5% of the left side), it's a lot easier to do so on the viewport. That's why I believe both are needed, even if the "viewport mode" should need to be enabled via a button. |
I second what groud said. |
Okay then, as I mentioned, If this is fine feel free to merge |
655753c
to
d0bcfa2
Compare
Thanks! |
This PR seeks to improve the usability regarding the anchors and margins workflow. It does :
WARNING: this is more or less compatibility breaking change, as anchors are no more automatically clamped between 0 and 1 when set. Should not hurt that much though, as I think few people do modify anchors programmatically.
Closes #21080
Closes #15252