Scaled text in a TextureRect looks bad

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By grymjack

I have a TextureRect with Labels inside. Sometimes, I need to scale the size of the TextureRect down a little. The text scales down with it and looks all crappy. Is there a way to allow the TextureRect to scale without affecting the text display? Up until now I have been keeping the text outside. But when I need to move the TextureRect around, I have to move all the pieces individually. Any ideas? Thanks.

:bust_in_silhouette: Reply From: iRad

In the inspector for the texture rect, you want to check “expand” for allowing the scale to be applied to the image inside the rect.
Don’t use scale in the transform, just use the regular rectangle dimensions.

If you apply the scale to the transform it will affect all the children, while if you use the “expand” it will operate internally on the texture. Just adjust how you want to visualize the image inside the rect on the following drop-down menu.

Thanks for answering. This was for a frame around a popup display with lots of text.

grymjack | 2022-12-21 22:24