Skip to content

Commit 625fe4c

Browse files
committed
Set dynamics dialog to correct size after something is made visible or hidden
1 parent a0c7dd4 commit 625fe4c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/UI/GlobalToolOptions/DynamicsPanel.gd

+7
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ func _ready() -> void:
2929
size_velocity_button.toggled.connect(
3030
_on_dynamics_toggled.bind(size_velocity_button, SIZE, Tools.Dynamics.VELOCITY)
3131
)
32+
for child: Control in $VBoxContainer.get_children():
33+
## Resets the y-size to an appropriate value
34+
child.visibility_changed.connect(func ():
35+
await get_tree().process_frame
36+
size.y = 0
37+
size.y += 10
38+
)
3239

3340

3441
func _input(event: InputEvent) -> void:

0 commit comments

Comments
 (0)