When the widget is not transformed, it fills the available space as expected. However, after applying a Render Transform rotation (90°), the Fill behavior no longer works—the widget no longer fills the container.
I used image in example to easier to understand. In real case, that’s is a widget. So create material is not a way.
Could you please propose another solution? Thanks!
The fill behavior has no way to decide how to fill on an arbitrary angle (say 35°)
Your best approach is either to write your own rotation to scale calculation for arbitrary angles or (if you have just portrait landscape) to have 2 images fitted (one horizontal and one vertical) inside a widget switcher and switch between them.
You can use material instances in a widget and have the widget set values in the mat. But if it must be done only in widge, first it would help to know 2 things: Can user rotate image freely, or are you only trying to rotate when created based on whether image is portrait or landscape perspective?
If you’re just trying to match size/aspect of an image, try wrapping image in a size box, and tick the size to content box in the slot options. When you change image at runtime, do this in widget blueprint to override size using new image dimensions: