[gnome-shell] loginDialog: Limit user list to the available height



commit 09dbe17da05cb98c157a906ef9b3cb1c8a944bc1
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jul 10 18:58:05 2015 +0200

    loginDialog: Limit user list to the available height
    
    We currently will always allocate the user list's preferred size, so it
    will grow indefinitely and never scroll; limit the height instead to
    get the desired scrolling behavior when necessary.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754525

 js/gdm/loginDialog.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index c56651b..0e57536 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -535,6 +535,9 @@ const LoginDialog = new Lang.Class({
         let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
         let centerY = dialogBox.y1 + (dialogBox.y2 - dialogBox.y1) / 2;
 
+        natWidth = Math.min(natWidth, dialogBox.x2 - dialogBox.x1);
+        natHeight = Math.min(natHeight, dialogBox.y2 - dialogBox.y1);
+
         actorBox.x1 = Math.floor(centerX - natWidth / 2);
         actorBox.y1 = Math.floor(centerY - natHeight / 2);
         actorBox.x2 = actorBox.x1 + natWidth;


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