From 99812f26ea4a7ed90d5fe9a7662ec3d49de6194e Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Thu, 7 Mar 2024 23:16:27 +0100 Subject: [PATCH] replace deprecated St.ScrollView.vscroll patch by @darkblaze69 --- taskbar.js | 6 +++--- utils.js | 4 ++-- windowPreview.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/taskbar.js b/taskbar.js index e1f3e0f..8b599bd 100644 --- a/taskbar.js +++ b/taskbar.js @@ -142,7 +142,7 @@ export const TaskbarActor = GObject.registerClass({ scrollview.allocate(childBox); - let [value, , upper, , , pageSize] = scrollview[orientation[0] + 'scroll'].adjustment.get_values(); + let [value, , upper, , , pageSize] = scrollview[orientation[0] + 'adjustment'].get_values(); upper = Math.floor(upper); scrollview._dtpFadeSize = upper > pageSize ? this._delegate.iconSize : 0; @@ -277,7 +277,7 @@ export const Taskbar = class extends EventEmitter { x_align: rtl ? Clutter.ActorAlign.END : Clutter.ActorAlign.START }); - let adjustment = this._scrollView[orientation[0] + 'scroll'].adjustment; + const adjustment = this._scrollView[orientation[0] + 'adjustment']; this._workId = Main.initializeDeferredWork(this._box, this._redisplay.bind(this)); @@ -514,7 +514,7 @@ export const Taskbar = class extends EventEmitter { let adjustment, delta; - adjustment = this._scrollView[orientation[0] + 'scroll'].get_adjustment(); + adjustment = this._scrollView[orientation[0] + 'adjustment']; let increment = adjustment.step_increment; diff --git a/utils.js b/utils.js index 8fa2986..828e184 100644 --- a/utils.js +++ b/utils.js @@ -505,8 +505,8 @@ export const notify = function(text, iconName, action, isTransient) { * Return the amount of shift applied */ export const ensureActorVisibleInScrollView = function(scrollView, actor, fadeSize, onComplete) { - let vadjustment = scrollView.vscroll.adjustment; - let hadjustment = scrollView.hscroll.adjustment; + const vadjustment = scrollView.vadjustment; + const hadjustment = scrollView.hadjustment; let [vvalue, vlower, vupper, vstepIncrement, vpageIncrement, vpageSize] = vadjustment.get_values(); let [hvalue, hlower, hupper, hstepIncrement, hpageIncrement, hpageSize] = hadjustment.get_values(); diff --git a/windowPreview.js b/windowPreview.js index 3ab0730..f0a2741 100644 --- a/windowPreview.js +++ b/windowPreview.js @@ -509,7 +509,7 @@ export const PreviewMenu = GObject.registerClass({ } _getScrollAdjustmentValues() { - let [value , , upper, , , pageSize] = this._scrollView[(this.isVertical ? 'v' : 'h') + 'scroll'].adjustment.get_values(); + let [value , , upper, , , pageSize] = this._scrollView[(this.isVertical ? 'v' : 'h') + 'adjustment'].get_values(); return [value, upper, pageSize]; }