I have a question about Border/Box modes of Slate Brushes. When we use Border/Box mode with brush, then brush overriden size is not playing any role, engine just get size from resource itself - size of texture from brush resource object. It is understandable for textures from asset caching point of view - lesser different brush sizes we have, lesser different texture assets there will be and so effective data management. But in case of materials I think there may be possibility to change default UI material size - it is by default 32 x 32. May anyone clarify this?
Ok, I try to give a more detailed description. Here are four variants - Border with Texture32x32 (1), Border with Texture128x128 (2), Border with UI Material base on Texture 32x32 (3), Border with UI Material base on Texture 128x128 (4). You can see that when used with textures Border width depends on initial texture size (first two). But when we check Borders based on materials size is by default 32 and that’s is true for both materials, 32 and 128. So I think if it is possible to change this…
Image Size is not used in Bordeer mode and doesnt change anything. All size things are pulled from Brush resource object. So it is material in this case and that is why this seem to be rather practical case
This can be adjusted on PreConstruct and the value could be, potentially, pulled from a dynamic material instance, too, if needed. That should work OK.
But again, not sure if I’m getting the point.
But to me it seems as if you expect the widget to know material size but materials don’t have size… You will need to pipe that data in somehow, as a parameter perhaps or by some other means.
Brushes don’t have have that issue, the size is pulled from the resource (or overridden manually). So perhaps you could create brushes that use materials. This way you can specify the size upfront.
Hmm, what version are you using? I am sure that on 4.23 this is not working… So that can be resolution - it is not working on 4.23, but is fixed on newer ones
I check all things, there is no any error, just some special behaviour.
For BOX:
For Brushes that are based on textures there are two sizes - Texture actual size and Brush size, so margins are calculated with Texture actual size, overall size is equal to UI element local size
For Brushes that are based on materials, there is one size - Brush size, so margins are calculated with Brush size, overall size is equal to UI element local size. If material source texture samle size is lot smaller than UI element local size, then interpolation will be used, so you can loose sharpness
For BORDER:
In this mode margins keep same once calculated size all the time. This size is calculated in the same manner as for BOX: Texture actual size is used for Brushes that are based on textures and Brush size is used for Brushes that are based on materials