js: Stop using {v,h}scroll properties

We only use them to access the corresponding adjustments, and
ScrollView now exposes those directly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>
This commit is contained in:
Florian Müllner
2023-11-15 14:31:37 +01:00
committed by Marge Bot
parent a63d5b6b09
commit 998d703bc2
8 changed files with 16 additions and 17 deletions

View File

@ -529,8 +529,7 @@ var BaseAppView = GObject.registerClass({
this._scrollTimeoutId = 0;
this._scrollView.connect('scroll-event', this._onScroll.bind(this));
const scroll = this._scrollView.hscroll;
this._adjustment = scroll.adjustment;
this._adjustment = this._scrollView.hadjustment;
this._adjustment.connect('notify::value', adj => {
const value = adj.value / adj.page_size;
this._pageIndicators.setCurrentPosition(value);
@ -2375,7 +2374,7 @@ export const FolderIcon = GObject.registerClass({
open() {
this._ensureFolderDialog();
this.view._scrollView.vscroll.adjustment.value = 0;
this.view._scrollView.vadjustment.value = 0;
this._dialog.popup();
}