[gnome-shell/wip/flashing-junk: 4/5] same



commit f720af569bef752dbff64ca0c8838e2aa6a1a9c9
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Aug 26 15:47:52 2013 -0400

    same

 js/gdm/authPrompt.js  |    6 +-----
 js/gdm/loginDialog.js |   31 ++++++++++++++-----------------
 2 files changed, 15 insertions(+), 22 deletions(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 6c26350..73763f3 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -120,7 +120,7 @@ const AuthPrompt = new Lang.Class({
                          x_align: St.Align.MIDDLE,
                          y_align: St.Align.END });
 
-        this._defaultButtonWell = new St.Widget();
+        this._defaultButtonWell = new St.Widget({ layout_manager: new Clutter.BinLayout() });
         this._defaultButtonWellActor = null;
 
         this._initButtons();
@@ -265,10 +265,6 @@ const AuthPrompt = new Lang.Class({
 
     addActorToDefaultButtonWell: function(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) {
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index c6c4f02..ae09bc2 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -393,6 +393,7 @@ const LoginDialog = new Lang.Class({
 
     _init: function(parentActor) {
         this.actor = new St.Widget({ accessible_role: Atk.Role.WINDOW,
+                                     layout_manager: new Clutter.BinLayout(),
                                      style_class: 'login-dialog',
                                      visible: false });
 
@@ -431,11 +432,12 @@ const LoginDialog = new Lang.Class({
                                    Lang.bind(this, this._updateLogoTexture));
 
         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,
                                                     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._bannerLabel = new St.Label({ style_class: 'login-dialog-banner',
@@ -453,12 +455,8 @@ const LoginDialog = new Lang.Class({
         this._authPrompt.connect('prompted', Lang.bind(this, this._onPrompted));
         this._authPrompt.connect('reset', Lang.bind(this, this._onReset));
         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._userList.actor.add_constraint(new Clutter.BindConstraint({ source: this._authPrompt.actor,
                                                                          coordinate: 
Clutter.BindCoordinate.WIDTH }));
 
@@ -484,14 +482,11 @@ const LoginDialog = new Lang.Class({
                                      x_align: St.Align.START,
                                      x_fill: true });
 
-        this._logoBin = new St.Bin({ style_class: 'login-dialog-logo-bin', y_expand: true });
-        this._logoBin.set_y_align(Clutter.ActorAlign.END);
-        this._logoBin.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
-                                                                   align_axis: Clutter.AlignAxis.X_AXIS,
-                                                                   factor: 0.5 }));
-        this._logoBin.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
-                                                                   align_axis: Clutter.AlignAxis.Y_AXIS,
-                                                                   factor: 1.0 }));
+        this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin',
+                                        x_align: Clutter.ActorAlign.CENTER,
+                                        y_align: Clutter.ActorAlign.END,
+                                        x_expand: true,
+                                        y_expand: true });
         this.actor.add_child(this._logoBin);
         this._updateLogo();
 
@@ -568,7 +563,9 @@ const LoginDialog = new Lang.Class({
         if (this._logoFileUri)
             icon = this._textureCache.load_uri_async(this._logoFileUri,
                                                      -1, _LOGO_ICON_HEIGHT);
-        this._logoBin.set_child(icon);
+
+        this._logoBin.destroy_all_children();
+        this._logoBin.add_child(icon);
     },
 
     _updateLogo: function() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]