From 44a4726a76ff75f50154e43c4bf8e9261930662c Mon Sep 17 00:00:00 2001 From: Julian Kandlhofer Date: Thu, 28 Mar 2024 18:02:35 +0100 Subject: [PATCH] fix deprecated "St.ScrollView.[hv]scroll" property only used to access adjustments, which can be directly accessed now. see: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020 --- dash.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dash.js b/dash.js index f607cc860..cd201efba 100644 --- a/dash.js +++ b/dash.js @@ -1140,13 +1140,17 @@ export const DockDash = GObject.registerClass({ * @param actor */ function ensureActorVisibleInScrollView(scrollView, actor) { - const {adjustment: vAdjustment} = scrollView.vscroll; - const {adjustment: hAdjustment} = scrollView.hscroll; + // access to scrollView.[hv]scroll was deprecated in gnome 46 + // instead, adjustment can be accessed directly + // keep old way for backwards compatibility (gnome <= 45) + const vAdjustment = scrollView.vadjustment ?? scrollView.vscroll.adjustment; + const hAdjustment = scrollView.hadjustment ?? scrollView.hscroll.adjustment; const {value: vValue0, pageSize: vPageSize, upper: vUpper} = vAdjustment; const {value: hValue0, pageSize: hPageSize, upper: hUpper} = hAdjustment; let [hValue, vValue] = [hValue0, vValue0]; let vOffset = 0; let hOffset = 0; + const fade = scrollView.get_effect('fade'); if (fade) { vOffset = fade.fade_margins.top;