You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a ScrollArea is put into a Ui with a very small max_rect (i.e. no, or very little, space left), the ScrollArea will collapse to something tiny, which cannot be interacted with.
My proposed solution is if each ScrollArea has a min_scrolled_size of e.g. 100.0 points. By this I mean that when the scroll bars are showing, the outer ScrollArea size will not shrink below this. If the contents is smaller than this size though, the scroll bars doesn't need to show and so the outer size of the ScrollArea can become smaller.
This happens most frequently when nesting ScrollAreas.
The outer ScrollArea will, by default, tell its children "keep it small". This is so that text inside a horizontal scroll area still wraps, and so that "space-filling" widgets (e.g. an Image that fills all available space) inside the ScrollArea don't become huge just because they can.
You can stop this behavior by adding ui.set_max_height(1e6); between the two ScrollArea:s, though that will instead make the second ScrollArea take up all the height it want, with no need for it to show any scroll bars (so you will need to call .set_max_height(500.0) on it).
The text was updated successfully, but these errors were encountered:
If a
ScrollArea
is put into aUi
with a very smallmax_rect
(i.e. no, or very little, space left), theScrollArea
will collapse to something tiny, which cannot be interacted with.My proposed solution is if each
ScrollArea
has amin_scrolled_size
of e.g.100.0
points. By this I mean that when the scroll bars are showing, the outerScrollArea
size will not shrink below this. If the contents is smaller than this size though, the scroll bars doesn't need to show and so the outer size of theScrollArea
can become smaller.This happens most frequently when nesting
ScrollAreas
.The outer
ScrollArea
will, by default, tell its children "keep it small". This is so that text inside a horizontal scroll area still wraps, and so that "space-filling" widgets (e.g. anImage
that fills all available space) inside theScrollArea
don't become huge just because they can.You can stop this behavior by adding
ui.set_max_height(1e6);
between the twoScrollArea
:s, though that will instead make the secondScrollArea
take up all the height it want, with no need for it to show any scroll bars (so you will need to call.set_max_height(500.0)
on it).The text was updated successfully, but these errors were encountered: