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:
Zander Brown
2023-11-07 10:47:14 +00:00
committed by Marge Bot
parent c72742486f
commit 49cca32ca5
12 changed files with 55 additions and 56 deletions

View File

@ -1016,9 +1016,9 @@ export class PopupSubMenu extends PopupMenuBase {
style_class: 'popup-sub-menu',
hscrollbar_policy: St.PolicyType.NEVER,
vscrollbar_policy: St.PolicyType.NEVER,
child: this.box,
});
this.actor.add_child(this.box);
this.actor._delegate = this;
this.actor.clip_to_allocation = true;
this.actor.connect('key-press-event', this._onKeyPressEvent.bind(this));