js: Cleanup usage of StScrollView
Whilst you *can* use add_actor() with ScrollView, it's more idiomatic to work on :child Cleanup a few extras along the way Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>
This commit is contained in:
@ -520,15 +520,15 @@ var BaseAppView = GObject.registerClass({
|
||||
y_expand: true,
|
||||
reactive: true,
|
||||
enable_mouse_scrolling: false,
|
||||
hscrollbar_policy: St.PolicyType.EXTERNAL,
|
||||
vscrollbar_policy: St.PolicyType.NEVER,
|
||||
child: this._grid,
|
||||
});
|
||||
this._scrollView.set_policy(St.PolicyType.EXTERNAL, St.PolicyType.NEVER);
|
||||
|
||||
this._canScroll = true; // limiting scrolling speed
|
||||
this._scrollTimeoutId = 0;
|
||||
this._scrollView.connect('scroll-event', this._onScroll.bind(this));
|
||||
|
||||
this._scrollView.add_child(this._grid);
|
||||
|
||||
const scroll = this._scrollView.hscroll;
|
||||
this._adjustment = scroll.adjustment;
|
||||
this._adjustment.connect('notify::value', adj => {
|
||||
|
Reference in New Issue
Block a user