st: Remove StBin's align properties
They are now completely unused, so remove them and stop the confusing shadowing of ClutterActor's own x/y-align properties. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803
This commit is contained in:
@ -162,9 +162,9 @@ var AuthPrompt = GObject.registerClass({
|
||||
can_focus: true,
|
||||
label: _("Cancel"),
|
||||
x_expand: true,
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
y_align: Clutter.ActorAlign.END,
|
||||
});
|
||||
this.cancelButton.set_x_align(Clutter.ActorAlign.START);
|
||||
this.cancelButton.set_y_align(Clutter.ActorAlign.END);
|
||||
this.cancelButton.connect('clicked', () => this.cancel());
|
||||
this._buttonBox.add_child(this.cancelButton);
|
||||
|
||||
@ -175,9 +175,9 @@ var AuthPrompt = GObject.registerClass({
|
||||
reactive: true,
|
||||
can_focus: true,
|
||||
label: _("Next"),
|
||||
x_align: Clutter.ActorAlign.END,
|
||||
y_align: Clutter.ActorAlign.END,
|
||||
});
|
||||
this.nextButton.set_x_align(Clutter.ActorAlign.END);
|
||||
this.nextButton.set_y_align(Clutter.ActorAlign.END);
|
||||
this.nextButton.connect('clicked', () => this.emit('next'));
|
||||
this.nextButton.add_style_pseudo_class('default');
|
||||
this._buttonBox.add_child(this.nextButton);
|
||||
|
@ -346,19 +346,13 @@ function insertSorted(array, val, cmp) {
|
||||
var CloseButton = GObject.registerClass(
|
||||
class CloseButton extends St.Button {
|
||||
_init(boxpointer) {
|
||||
super._init({ style_class: 'notification-close' });
|
||||
|
||||
// This is a bit tricky. St.Bin has its own x-align/y-align properties
|
||||
// that compete with Clutter's properties. This should be fixed for
|
||||
// Clutter 2.0. Since St.Bin doesn't define its own setters, the
|
||||
// setters are a workaround to get Clutter's version.
|
||||
this.set_x_align(Clutter.ActorAlign.END);
|
||||
this.set_y_align(Clutter.ActorAlign.START);
|
||||
|
||||
// XXX Clutter 2.0 workaround: ClutterBinLayout needs expand
|
||||
// to respect the alignments.
|
||||
this.set_x_expand(true);
|
||||
this.set_y_expand(true);
|
||||
super._init({
|
||||
style_class: 'notification-close',
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
x_align: Clutter.ActorAlign.END,
|
||||
y_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
|
||||
this._boxPointer = boxpointer;
|
||||
if (boxpointer)
|
||||
|
@ -1082,10 +1082,12 @@ class CalendarMessageList extends St.Widget {
|
||||
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
|
||||
box.add_actor(this._scrollView);
|
||||
|
||||
this._clearButton = new St.Button({ style_class: 'message-list-clear-button button',
|
||||
label: _("Clear"),
|
||||
can_focus: true });
|
||||
this._clearButton.set_x_align(Clutter.ActorAlign.END);
|
||||
this._clearButton = new St.Button({
|
||||
style_class: 'message-list-clear-button button',
|
||||
label: _('Clear'),
|
||||
can_focus: true,
|
||||
x_align: Clutter.ActorAlign.END,
|
||||
});
|
||||
this._clearButton.connect('clicked', () => {
|
||||
this._sectionList.get_children().forEach(s => s.clear());
|
||||
});
|
||||
|
@ -16,8 +16,8 @@ class CheckBox extends St.Button {
|
||||
this._box = new St.Bin({
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
y_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
this._box.set_y_align(Clutter.ActorAlign.START);
|
||||
container.add_actor(this._box);
|
||||
|
||||
this._label = new St.Label();
|
||||
|
@ -272,8 +272,8 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
|
||||
this._iconBin = new St.Bin({
|
||||
x_expand: true,
|
||||
x_align: Clutter.ActorAlign.END,
|
||||
});
|
||||
this._iconBin.set_x_align(Clutter.ActorAlign.END);
|
||||
mainContentLayout.add_child(this._iconBin);
|
||||
|
||||
let messageLayout = new St.BoxLayout({ vertical: true,
|
||||
|
@ -265,8 +265,8 @@ class ObjLink extends St.Button {
|
||||
track_hover: true,
|
||||
style_class: 'shell-link',
|
||||
label: text,
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
this.set_x_align(Clutter.ActorAlign.START);
|
||||
this.get_child().single_line_mode = true;
|
||||
|
||||
this._obj = o;
|
||||
|
@ -735,10 +735,12 @@ var PadOsd = GObject.registerClass({
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER });
|
||||
this.add_actor(buttonBox);
|
||||
this._editButton = new St.Button({ label: _("Edit…"),
|
||||
style_class: 'button',
|
||||
can_focus: true });
|
||||
this._editButton.set_x_align(Clutter.ActorAlign.CENTER);
|
||||
this._editButton = new St.Button({
|
||||
label: _('Edit…'),
|
||||
style_class: 'button',
|
||||
can_focus: true,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this._editButton.connect('clicked', () => {
|
||||
this.setEditionMode(true);
|
||||
});
|
||||
|
@ -340,9 +340,9 @@ var PopupSwitchMenuItem = GObject.registerClass({
|
||||
this.add_child(this.label);
|
||||
|
||||
this._statusBin = new St.Bin({
|
||||
x_align: Clutter.ActorAlign.END,
|
||||
x_expand: true,
|
||||
});
|
||||
this._statusBin.set_x_align(Clutter.ActorAlign.END);
|
||||
this.add_child(this._statusBin);
|
||||
|
||||
this._statusLabel = new St.Label({
|
||||
|
@ -770,13 +770,15 @@ var ProviderInfo = GObject.registerClass(
|
||||
class ProviderInfo extends St.Button {
|
||||
_init(provider) {
|
||||
this.provider = provider;
|
||||
super._init({ style_class: 'search-provider-icon',
|
||||
reactive: true,
|
||||
can_focus: true,
|
||||
accessible_name: provider.appInfo.get_name(),
|
||||
track_hover: true });
|
||||
super._init({
|
||||
style_class: 'search-provider-icon',
|
||||
reactive: true,
|
||||
can_focus: true,
|
||||
accessible_name: provider.appInfo.get_name(),
|
||||
track_hover: true,
|
||||
y_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
|
||||
this.set_y_align(Clutter.ActorAlign.START);
|
||||
this._content = new St.BoxLayout({ vertical: false,
|
||||
style_class: 'list-search-provider-content' });
|
||||
this.set_child(this._content);
|
||||
|
@ -175,15 +175,16 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
}
|
||||
|
||||
_createActionButton(iconName, accessibleName) {
|
||||
let icon = new St.Button({ reactive: true,
|
||||
can_focus: true,
|
||||
track_hover: true,
|
||||
accessible_name: accessibleName,
|
||||
x_expand: true,
|
||||
style_class: 'system-menu-action' });
|
||||
icon.set_x_align(Clutter.ActorAlign.CENTER);
|
||||
icon.child = new St.Icon({ icon_name: iconName });
|
||||
return icon;
|
||||
return new St.Button({
|
||||
child: new St.Icon({ icon_name: iconName }),
|
||||
reactive: true,
|
||||
can_focus: true,
|
||||
track_hover: true,
|
||||
accessible_name: accessibleName,
|
||||
x_expand: true,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
style_class: 'system-menu-action',
|
||||
});
|
||||
}
|
||||
|
||||
_createSubMenu() {
|
||||
|
Reference in New Issue
Block a user