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:
@ -919,20 +919,21 @@ class DateMenuButton extends PanelMenu.Button {
|
||||
vbox.add_child(this._date);
|
||||
vbox.add_child(this._calendar);
|
||||
|
||||
this._displaysSection = new St.ScrollView({
|
||||
style_class: 'datemenu-displays-section vfade',
|
||||
x_expand: true,
|
||||
overlay_scrollbars: true,
|
||||
});
|
||||
this._displaysSection.set_policy(St.PolicyType.NEVER, St.PolicyType.EXTERNAL);
|
||||
vbox.add_child(this._displaysSection);
|
||||
|
||||
const displaysBox = new St.BoxLayout({
|
||||
vertical: true,
|
||||
x_expand: true,
|
||||
style_class: 'datemenu-displays-box',
|
||||
});
|
||||
this._displaysSection.add_child(displaysBox);
|
||||
|
||||
this._displaysSection = new St.ScrollView({
|
||||
style_class: 'datemenu-displays-section vfade',
|
||||
x_expand: true,
|
||||
overlay_scrollbars: true,
|
||||
hscrollbar_policy: St.PolicyType.NEVER,
|
||||
vscrollbar_policy: St.PolicyType.EXTERNAL,
|
||||
child: displaysBox,
|
||||
});
|
||||
vbox.add_child(this._displaysSection);
|
||||
|
||||
this._eventsItem = new EventsSection();
|
||||
displaysBox.add_child(this._eventsItem);
|
||||
|
Reference in New Issue
Block a user