From 2501bc5c8f97581a3ea1bb141feb5c721a316de7 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Sat, 13 Feb 2021 21:13:57 +0100 Subject: [PATCH] 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: --- src/st/st-scroll-view-fade.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/st/st-scroll-view-fade.glsl b/src/st/st-scroll-view-fade.glsl index 2eacfd9af..e3f1a259f 100644 --- a/src/st/st-scroll-view-fade.glsl +++ b/src/st/st-scroll-view-fade.glsl @@ -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) {