Godot: please allow resizing controls in containers

Created on 30 Aug 2019  路  14Comments  路  Source: godotengine/godot

please allow resizing controls in container controls.
most of the time controls are not sized properly in containers.
allowing people to edit the size and position of containing items would make godot so much nicer.

Godot version: 3.1.1

archived discussion

Most helpful comment

You can use rect_min_size to have a better control of the size. There are also size_flags. Containers are there to set the size and position automatically, so it makes no sense to get in their way.

All 14 comments

You can use rect_min_size to have a better control of the size. There are also size_flags. Containers are there to set the size and position automatically, so it makes no sense to get in their way.

I don't want to have to mess with minsize I would like to be able to drag the edges to the desired rectangle or set the rectangle itself through the properties editor.

Use a Panel then I guess, if you don't want it to be a container?

That's not how things work. Containers compute the size of their children, and this is not going to change, as this is what they are useful for. However, most containers use their children size flags and computed minimum size to compute this positioning.

If you need to resize a child of a container, you can set the rect_min_size property to eventually override this computed minimum size.

I don't want to have to mess with minsize I would like to be able to drag the edges to the desired rectangle or set the rectangle itself through the properties editor.

As this is not a common use case, providing a way to modify the rect_min_size on the editor will lead a lot of people to mess with their children of container's minimum size. This would cause more harm than good.

Worth to mention that it was previously possible, but not intended and was bugged, because containers override the size anyways.

I use(d) sort_children signal for overriding (or rather adding upon) final properties of controls (including size), but this must be done via code.

allowing people to edit the size and position of containing items would make godot so much nicer

I think what you're describing could be done by adjusting custom margin/separation properties.

well at least let use drag the borders and treat them as min size.

Might be using the wrong node, Shadow. FWIW, there is a Creating custom Containers section here that might help

well at least let use drag the borders and treat them as min size.

As I said, this is what I want to avoid. Your use case is pretty rare, and allowing user to change the min size visually will create a lot of confusion.
So I don't think it is a good idea, modifying the min size in the inspector is sufficient for this use case.

currently its a pain to figure out how to edit the size of controls in containers so I would disagree.
there needs to be some easier way to just drag them to where you need them.

currently its a pain to figure out how to edit the size of controls in containers so I would disagree.
there needs to be some easier way to just drag them to where you need them.

If you need to precisely position and resize control nodes, you should use the anchor and margins workflow, not the container one. Containers are meant to compute their children position and size, so if you want precise positioning you should not use them.

I made this issue because my control were going out of the bounds of containers in the first place and I didn't have a way to resize them easily.

I still think there needs to be a clearer way to resize controls in containers.
for example what if the control has a inherited min size that exceeds the bounds of the container?

it would just be easier to drag the controls to the desired position and size.

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

Was this page helpful?
0 / 5 - 0 ratings