util: Use fade_margins in ensureActorVisibleInScrollView function

Commit f60a469a34 removed vfade_offset in favor of fade_margins.
Util.ensureActorVisibleInScrollView function needs to be adjusted
accordingly.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4080

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1802>
This commit is contained in:
Andrew Zaech 2021-04-10 13:02:31 +00:00 committed by Florian Müllner
parent 53dd291aba
commit ce4ece2c44

View File

@ -370,7 +370,7 @@ function ensureActorVisibleInScrollView(scrollView, actor) {
let offset = 0; let offset = 0;
let vfade = scrollView.get_effect("fade"); let vfade = scrollView.get_effect("fade");
if (vfade) if (vfade)
offset = vfade.vfade_offset; offset = vfade.fade_margins.top;
let box = actor.get_allocation_box(); let box = actor.get_allocation_box();
let y1 = box.y1, y2 = box.y2; let y1 = box.y1, y2 = box.y2;