Slate ScrollBox scroll bar height on small height containers

Hi,

I have encountered a bug with the Slate ScrollBox in C++ programming:

I have a (vertical) scrollbox wrapped into a box with a height override of 30 in order to limit the size of the scrollbox to the equivalent of one line of text. This works really well, except that the scrollbar on the side takes the whole height regardless of how much you can scroll.

This happens only with small scrollboxes (in terms of height, for a vertical oriented scrollbox)

The expected behaviour is that the scrollbar has a size that is a ratio of the portion of the scrollbox on screen, divided by the total height (in my case) of the scrollbox. When this ratio is 1, then the scrollbar will not be visible because the whole scrollbox is visible. When this ratio is 0.5, the height of the scrollbar is 50% of the height of the scrollbox on screen, etc…

Well here the scrollbar does get hidden when there is no need for it, but otherwise it is always at maximum height.

Screenshots:

Good scrollbar: https://i.gyazo.com/e4b39260f829f521d823448c2e50d310.png

Bad scrollbar: https://i.gyazo.com/ce76ea5ba75f52b547955c1a09a997c6.png

Apologies for the poor contrast.

Hello Altrue,

Thank you for reporting this issue. I’ve placed a bug report in for this issue and it seems to occur with both UMG and Slate code. You can find/track the bug report here: UE-42875

Thank you for taking the time to look into this :slight_smile: