diff --git a/src/UI/GlobalToolOptions/DynamicsPanel.gd b/src/UI/GlobalToolOptions/DynamicsPanel.gd index e798298d2f3..c8738ae3a24 100644 --- a/src/UI/GlobalToolOptions/DynamicsPanel.gd +++ b/src/UI/GlobalToolOptions/DynamicsPanel.gd @@ -29,6 +29,15 @@ func _ready() -> void: size_velocity_button.toggled.connect( _on_dynamics_toggled.bind(size_velocity_button, SIZE, Tools.Dynamics.VELOCITY) ) + for child: Control in $VBoxContainer.get_children(): + ## Resets the y-size to an appropriate value + child.visibility_changed.connect(_recalculate_size) + + +func _recalculate_size(): + await get_tree().process_frame + set_size(Vector2i(size.x, 0)) + set_size(Vector2i(size.x, size.y + 10)) func _input(event: InputEvent) -> void: