gdm: Remove constraints from authPrompt / loginDialog as well

https://bugzilla.gnome.org/show_bug.cgi?id=706843
This commit is contained in:
Jasper St. Pierre 2013-08-26 15:47:52 -04:00
parent 1f50f4658d
commit 41aa14eaf0
3 changed files with 15 additions and 27 deletions

View File

@ -2271,6 +2271,7 @@ StScrollBar StButton#vhandle:active {
.login-dialog-user-list { .login-dialog-user-list {
spacing: 12px; spacing: 12px;
padding: .2em; padding: .2em;
width: 23em;
} }
.login-dialog-user-list-item { .login-dialog-user-list-item {

View File

@ -120,7 +120,7 @@ const AuthPrompt = new Lang.Class({
x_align: St.Align.MIDDLE, x_align: St.Align.MIDDLE,
y_align: St.Align.END }); y_align: St.Align.END });
this._defaultButtonWell = new St.Widget(); this._defaultButtonWell = new St.Widget({ layout_manager: new Clutter.BinLayout() });
this._defaultButtonWellActor = null; this._defaultButtonWellActor = null;
this._initButtons(); this._initButtons();
@ -265,10 +265,6 @@ const AuthPrompt = new Lang.Class({
addActorToDefaultButtonWell: function(actor) { addActorToDefaultButtonWell: function(actor) {
this._defaultButtonWell.add_child(actor); this._defaultButtonWell.add_child(actor);
actor.add_constraint(new Clutter.AlignConstraint({ source: this._spinner.actor,
align_axis: Clutter.AlignAxis.BOTH,
factor: 0.5 }));
}, },
setActorInDefaultButtonWell: function(actor, animate) { setActorInDefaultButtonWell: function(actor, animate) {

View File

@ -388,6 +388,7 @@ const LoginDialog = new Lang.Class({
_init: function(parentActor) { _init: function(parentActor) {
this.actor = new St.Widget({ accessible_role: Atk.Role.WINDOW, this.actor = new St.Widget({ accessible_role: Atk.Role.WINDOW,
layout_manager: new Clutter.BinLayout(),
style_class: 'login-dialog', style_class: 'login-dialog',
visible: false }); visible: false });
@ -426,11 +427,12 @@ const LoginDialog = new Lang.Class({
Lang.bind(this, this._updateLogoTexture)); Lang.bind(this, this._updateLogoTexture));
this._userSelectionBox = new St.BoxLayout({ style_class: 'login-dialog-user-selection-box', this._userSelectionBox = new St.BoxLayout({ style_class: 'login-dialog-user-selection-box',
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
x_expand: true,
y_expand: true,
vertical: true, vertical: true,
visible: false }); visible: false });
this._userSelectionBox.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
align_axis: Clutter.AlignAxis.BOTH,
factor: 0.5 }));
this.actor.add_child(this._userSelectionBox); this.actor.add_child(this._userSelectionBox);
this._bannerLabel = new St.Label({ style_class: 'login-dialog-banner', this._bannerLabel = new St.Label({ style_class: 'login-dialog-banner',
@ -448,14 +450,7 @@ const LoginDialog = new Lang.Class({
this._authPrompt.connect('prompted', Lang.bind(this, this._onPrompted)); this._authPrompt.connect('prompted', Lang.bind(this, this._onPrompted));
this._authPrompt.connect('reset', Lang.bind(this, this._onReset)); this._authPrompt.connect('reset', Lang.bind(this, this._onReset));
this._authPrompt.hide(); this._authPrompt.hide();
this._authPrompt.actor.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
align_axis: Clutter.AlignAxis.BOTH,
factor: 0.5 }));
this.actor.add_child(this._authPrompt.actor); this.actor.add_child(this._authPrompt.actor);
this._userList.actor.add_constraint(new Clutter.BindConstraint({ source: this._authPrompt.actor,
coordinate: Clutter.BindCoordinate.WIDTH }));
// translators: this message is shown below the user list on the // translators: this message is shown below the user list on the
// login screen. It can be activated to reveal an entry for // login screen. It can be activated to reveal an entry for
@ -479,14 +474,11 @@ const LoginDialog = new Lang.Class({
x_align: St.Align.START, x_align: St.Align.START,
x_fill: true }); x_fill: true });
this._logoBin = new St.Bin({ style_class: 'login-dialog-logo-bin', y_expand: true }); this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin',
this._logoBin.set_y_align(Clutter.ActorAlign.END); x_align: Clutter.ActorAlign.CENTER,
this._logoBin.add_constraint(new Clutter.AlignConstraint({ source: this.actor, y_align: Clutter.ActorAlign.END,
align_axis: Clutter.AlignAxis.X_AXIS, x_expand: true,
factor: 0.5 })); y_expand: true });
this._logoBin.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
align_axis: Clutter.AlignAxis.Y_AXIS,
factor: 1.0 }));
this.actor.add_child(this._logoBin); this.actor.add_child(this._logoBin);
this._updateLogo(); this._updateLogo();
@ -559,11 +551,10 @@ const LoginDialog = new Lang.Class({
if (this._logoFileUri != uri) if (this._logoFileUri != uri)
return; return;
let icon = null; this._logoBin.destroy_all_children();
if (this._logoFileUri) if (this._logoFileUri)
icon = this._textureCache.load_uri_async(this._logoFileUri, this._logoBin.add_child(this._textureCache.load_uri_async(this._logoFileUri,
-1, _LOGO_ICON_HEIGHT); -1, _LOGO_ICON_HEIGHT));
this._logoBin.set_child(icon);
}, },
_updateLogo: function() { _updateLogo: function() {