[gnome-shell/gnome-3-16] gdm: fix banner allocation computation



commit 77f2e3abdee24d5a979a50ece908a274443abf94
Author: Ray Strode <rstrode redhat com>
Date:   Thu Jun 25 15:39:58 2015 -0400

    gdm: fix banner allocation computation
    
    The code to figure how how much room that banner had was wrong.
    This commit fixes it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751517

 js/gdm/loginDialog.js |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 38f53d4..0dabacd 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -584,7 +584,14 @@ const LoginDialog = new Lang.Class({
         // try a different layout, or if we have what extra space we
         // can hand out
         if (bannerAllocation) {
-            let leftOverYSpace = dialogHeight - bannerHeight - authPromptHeight - logoHeight;
+            let bannerSpace;
+
+            if (authPromptAllocation)
+                bannerSpace = authPromptAllocation.y1 - bannerAllocation.y1;
+            else
+                bannerSpace = 0;
+
+            let leftOverYSpace = bannerSpace - bannerHeight;
 
             if (leftOverYSpace > 0) {
                  // First figure out how much left over space is up top


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