st/scroll-view-fade: Fix vertical top fading

The fade for the vertical top edge was calculating the fade ratio for a
larger height (up to where the bottom fade starts) than it was
displaying.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1674>
This commit is contained in:
Sebastian Keller 2021-02-13 21:13:57 +01:00 committed by Marge Bot
parent 8a76508f71
commit 2501bc5c8f

View File

@ -55,7 +55,7 @@ void main ()
float vfade_scale = height / vfade_offset;
if (fade_top) {
ratio *= (fade_area_topleft[1] - y) / (fade_area_topleft[1] - fade_bottom_start);
ratio *= (fade_area_topleft[1] - y) / (fade_area_topleft[1] - fade_top_start);
}
if (fade_bottom) {