godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.79k stars 21.13k forks source link

Resizing Ninepatchrect horizontaly does not draw child label text. #73385

Closed Bargeral closed 1 year ago

Bargeral commented 1 year ago

Godot version

v4.0.rc2.official [d2699dc7a]

System information

Windows 10

Issue description

Resizing a ninepatchrect horizontally causes child label text to not show.
Vertical resizing is fine.
If you resize it enough that label has to re-do the text wrap then text shows up. Toggle the visibility and text will show up. Resize the 9patch Vertically and text will show up.

I would think a comparison between the Vertical and Horizontal handling in the code would show the issue.

https://user-images.githubusercontent.com/3193592/219109730-d19edde5-6049-4460-9cab-f15ec2a3ea4a.mp4

Steps to reproduce

In attached project, resize the 9pathc node and observe the label text behavior. Also, see attached video

Minimal reproduction project

ninepatch_bug.zip

YuriSizov commented 1 year ago

This is similar to https://github.com/godotengine/godot/issues/73296 and fixed by https://github.com/godotengine/godot/pull/73343.