-
-
Notifications
You must be signed in to change notification settings - Fork 23.5k
Add SizeContainer
#112364
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
base: master
Are you sure you want to change the base?
Add SizeContainer
#112364
Conversation
|
The icon SVG currently is a simple copy of |
4fefff8 to
398d516
Compare
|
Can this new node enable the |
|
So how is it better than #94171? |
Because that is giving ScrollContainer the responsibility of limiting size, and necessitates a workaround - making invisible scrollbars - to achieve the same effect.
It should. If it doesn't, then there's an implementation issue. WIll try it, and fix if it doesn't work. |
4706ca5 to
5afa427
Compare
|
Added support for ScrollContainer. This required a bit more of an involved change since there was no existing way to get the "maximum size" a Control could fill. I put it as the Edit: maybe this could be used for autowrap with Labels, will investigate |
Adds a `SizeContainer` node, which supports a `maximum_size` property. The `maximum_size` will serve as a cap on the size of the container. All children of this container will be clipped to fit within that cap. If a child has expand size flag, the container will expand to its maximum size in the specified axis Cannot have specific anchor flags which would cause it to expand to be larger than its designated maximum size
5afa427 to
2d0ac66
Compare
custom_maximum_sizetoControlgodot-proposals#13534ScrollContainer.max_size#94171Adds a
SizeContainernode, which supports amaximum_sizeproperty. Themaximum_sizewill serve as a cap on the size of the container. All children of this container will be clipped to fit within that cap.The
maximum_sizeis aSize2, and will apply dimension-wise if that dimension's value is greater than 0.maximum_size = (100,0)will cap the width to 100 but will not cap the heightIf a child has
Expandsize flag, the container will expand to its maximum size in the specified axis.Cannot have specific anchor flags, which would cause it to expand to be larger than its designated maximum size (namely all of the Wide types and the Full Rect). This can technically still be overriden by using Custom anchoring, but that's A. beyond my control, B. an advanced user thing - use it at your own risk.