Expand description
Content that fades out where it runs off the edge of its region.
ScrollFade says the same thing the shadow along the top of a
ScrollArea says — there is more content past
this edge — and says it where a shadow cannot: over a translucent or
frosted surface, where “the colour of what is behind the window” is not a
colour anything can paint. Instead of covering the content with a gradient,
the fade multiplies the opacity of every primitive by how close it is to an
active edge, so a glyph half inside the band is half faded rather than the
whole row dimming at once.
The edges are the caller’s statement about overflow, not this component’s
guess: a region scrolled to its end fades at the start edge only, and one
that fits fades at neither. Reading those from
scroll_offset keeps the fade truthful,
and turning both on unconditionally would tell the reader there is content
past an edge where there is none.
A fade is information rather than decoration, so it is not suppressed under reduced motion; it does not animate, and nothing about it moves on its own.
Structs§
- Fade
Edges - Which edges of a region its content fades towards.
- Scroll
Fade - A region whose content fades towards the edges it is scrolled past.