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

Prevent editing a container child's position and size in the inspector #2202

Closed
eighteen-k-gold-malow opened this issue Jan 29, 2021 · 2 comments · Fixed by godotengine/godot#30623

Comments

@eighteen-k-gold-malow
Copy link

Describe the project you are working on

UI design

Describe the problem or limitation you are having in your project

If I use anchor for percentage layout, once I modify the margin or anchor of the topmost control, it will cause all child controls to automatically set the margin, and then the layout will be messed up

Describe the feature / enhancement and how it helps to overcome the problem or limitation

  1. It is recommended to add an optional option to freeze or lock properties such as rect, anchor, margin, otherwise following the changes of the parent control will cause problems such as disordered layout
  2. Add new attributes: min anchor, max anchor, min margin max margin, min rect max rect

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

If this enhancement will not be used often, can it be worked around with a few lines of script?

Is there a reason why this should be core and not an add-on in the asset library?

@Calinou Calinou changed the title Suggestions for improvement of layout issues Prevent editing a container child's position and size in the inspector Jan 29, 2021
@YuriSizov
Copy link
Contributor

YuriSizov commented Jan 29, 2021

If I use anchor for percentage layout, once I modify the margin or anchor of the topmost control, it will cause all child controls to automatically set the margin, and then the layout will be messed up

I'm not sure I understand your problem. Changing parent's properties is supposed to cause a cascading effect on its children, that's in the nature of the parent-child relationship.

@groud
Copy link
Member

groud commented Sep 6, 2021

For reference, this was implemented by godotengine/godot#30623.

@Calinou Calinou removed the archived label Sep 6, 2021
@Calinou Calinou added this to the 4.0 milestone Sep 6, 2021
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.

4 participants