js: Replace child properties

Every since commit aa394754, StBoxLayout has supported ClutterActor's
expand/align properties in addition to the container-specific child
properties. Given that that's the only container left with a special
child meta, it's time to fully embrace the generic properties (and
eventually remove the child meta).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/780
This commit is contained in:
Florian Müllner
2019-10-21 20:44:00 +02:00
committed by Georges Basile Stavracas Neto
parent 4338ca5fd9
commit 104071acbd
35 changed files with 391 additions and 318 deletions

View File

@ -263,7 +263,7 @@ var ShellMountQuestionDialog = GObject.registerClass({
super._init({ styleClass: 'mount-dialog' });
this._content = new Dialog.MessageDialogContent({ icon });
this.contentLayout.add(this._content, { x_fill: true, y_fill: false });
this.contentLayout.add_child(this._content);
}
update(message, choices) {
@ -299,8 +299,11 @@ var ShellMountPasswordDialog = GObject.registerClass({
let rtl = grid.get_text_direction() === Clutter.TextDirection.RTL;
if (flags & Gio.AskPasswordFlags.TCRYPT) {
this._keyfilesLabel = new St.Label(({ style_class: 'prompt-dialog-keyfiles-label',
visible: false }));
this._keyfilesLabel = new St.Label({
style_class: 'prompt-dialog-keyfiles-label',
visible: false,
y_align: Clutter.ActorAlign.CENTER,
});
this._hiddenVolume = new CheckBox.CheckBox(_("Hidden Volume"));
content.messageBox.add(this._hiddenVolume);
@ -318,7 +321,7 @@ var ShellMountPasswordDialog = GObject.registerClass({
);
this._keyfilesLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._keyfilesLabel.clutter_text.line_wrap = true;
content.messageBox.add(this._keyfilesLabel, { y_fill: false, y_align: St.Align.MIDDLE, expand: true });
content.messageBox.add_child(this._keyfilesLabel);
this._pimLabel = new St.Label({ style_class: 'prompt-dialog-password-label',
text: _("PIM Number"),
@ -491,14 +494,16 @@ var ShellProcessesDialog = GObject.registerClass({
super._init({ styleClass: 'mount-dialog' });
this._content = new Dialog.MessageDialogContent({ icon });
this.contentLayout.add(this._content, { x_fill: true, y_fill: false });
this.contentLayout.add_child(this._content);
let scrollView = new St.ScrollView({ style_class: 'mount-dialog-app-list' });
let scrollView = new St.ScrollView({
style_class: 'mount-dialog-app-list',
x_expand: true,
y_expand: true,
});
scrollView.set_policy(St.PolicyType.NEVER,
St.PolicyType.AUTOMATIC);
this.contentLayout.add(scrollView,
{ x_fill: true,
y_fill: true });
this.contentLayout.add_child(scrollView);
scrollView.hide();
this._applicationList = new St.BoxLayout({ vertical: true });
@ -527,7 +532,7 @@ var ShellProcessesDialog = GObject.registerClass({
return;
let item = new ListItem(app);
this._applicationList.add(item, { x_fill: true });
this._applicationList.add_child(item);
item.connect('activate', () => {
// use -1 to indicate Cancel