rothiotome / godot-very-simple-twitch

Very Simple Twitch Chat integration for Godot
MIT License
39 stars 6 forks source link

Fix height 0 bug on Dock #19

Closed Edearth closed 3 months ago

Edearth commented 3 months ago

1. Why?

The first time I opened the Dock it had a height of 0. It looked like this: photo_2024-06-28_16-03-01

It can still be resized to be taller, but it can also be shrunk to 0 pixels again. Apparently Godot doesn't like the root node being a Control, since it cannot tell what its height is.

2. How?

Make the (already existing) VBoxContainer the root node of the Dock scene. That way Godot knows what its current height is and it can be resized without issue.

This is how it goes with the smallest possible resolution Godot allows me to set: image

The original note also had a script and some signals connecting to it. I also moved them, so now it's the VBoxContainer the one with the script and the signals connected.

3. Related Issue

n/a

4. Checklist:

5. Tests made (if appropriate)

After making the change and reloading the editor, tested manually:

6. Notes (if appropriate)

n/a

rothiotome commented 3 months ago

Tested and working!

A clean and simple solution, thanks for your contribution!