[gnome-shell/wip/reorg: 12/15] loginDialog: pre-allocate prompt message height



commit 7b440f38642e12207c3ca91198f84d6f140630f9
Author: Ray Strode <rstrode redhat com>
Date:   Wed Jun 19 12:56:23 2013 -0400

    loginDialog: pre-allocate prompt message height
    
    Right now things jump around if a message comes in.
    This commit makes sure there's room for a message to start.

 js/ui/auth/loginDialog.js |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/auth/loginDialog.js b/js/ui/auth/loginDialog.js
index 4ccfe03..bbe6460 100644
--- a/js/ui/auth/loginDialog.js
+++ b/js/ui/auth/loginDialog.js
@@ -161,11 +161,10 @@ const LoginDialog = new Lang.Class({
                             { expand: false,
                               x_fill: false });
 
-        this._promptMessage = new St.Label({ visible: false });
+        this._promptMessage = new St.Label({ opacity: 0 });
         this._promptBox.add(this._promptMessage, { x_fill: true });
 
         this._promptLoginHint = new St.Label({ style_class: 'login-dialog-prompt-login-hint-message' });
-        this._promptLoginHint.hide();
         this._promptBox.add(this._promptLoginHint);
 
         this._sessionList = new SessionList.SessionList();
@@ -290,7 +289,7 @@ const LoginDialog = new Lang.Class({
         this._userVerifier.clear();
 
         this._updateSensitivity(true);
-        this._promptMessage.hide();
+        this._promptMessage.opacity = 0;
         this._user = null;
         this._verifyingUser = false;
 
@@ -342,20 +341,19 @@ const LoginDialog = new Lang.Class({
         if (message) {
             this._promptMessage.text = message;
             this._promptMessage.styleClass = styleClass;
-            this._promptMessage.show();
+            this._promptMessage.opacity = 255;
         } else {
-            this._promptMessage.hide();
+            this._promptMessage.opacity = 0;
         }
     },
 
     _showLoginHint: function(verifier, message) {
         this._promptLoginHint.set_text(message)
-        this._promptLoginHint.show();
         this._promptLoginHint.opacity = 255;
     },
 
     _hideLoginHint: function() {
-        this._promptLoginHint.hide();
+        this._promptLoginHint.opacity = 0;
         this._promptLoginHint.set_text('');
     },
 
@@ -497,7 +495,7 @@ const LoginDialog = new Lang.Class({
 
         this._setWorking(false);
         this._promptBox.hide();
-        this._promptLoginHint.hide();
+        this._promptLoginHint.opacity = 0;
 
         this._promptUser.set_child(null);
 
@@ -505,7 +503,7 @@ const LoginDialog = new Lang.Class({
         this._promptEntry.set_text('');
 
         this._sessionList.close();
-        this._promptLoginHint.hide();
+        this._promptLoginHint.opacity = 0;
 
         this._buttonBox.destroy_all_children();
         this._signInButton = null;


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