How to avoid shrinking of texture margins for StyleBoxTexture in Godot 3.2?

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

Hi everyone, I was recently migrated to Godot 3.2 and noticed that behavior of StyleBoxTexture has changed, comparing to version 3.1. Here you can see two buttons, both use the same StyleBoxTexture, which has margins are: 10px top and bottom, 16px left and right:

enter image description here

The button on the right side looks fine, but the left one looks weird, because texture size is bigger than button rect and its margins shrink along with the whole texture.

Thanks in advance.

similar problem with unintentional shrinkage?
godot buttons can't be resized to 8×8 · Issue #35005 · godotengine/godot · GitHub

maybe just make the texture as small as possible… even if it is 5x5 or 10x10 it can stretch to everything?

rakkarage | 2020-08-04 13:35

This can work for small elements like buttons, but I also have the same problem on dialog windows, where I want to have large background pattern.

Grigory | 2020-08-05 19:41