[gnome-shell/eos3.8: 90/255] iconGrid: Don't compute any space between pages when there's only one page



commit c433fab0ce73c10b099629307f12e73c5a42e305
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Sat Jun 17 00:01:13 2017 +0100

    iconGrid: Don't compute any space between pages when there's only one page
    
    Use the default spacing between icons, which will give enough room for the
    popups to render properly while not breaking the rest of the computations
    that already accounted for that. This will prevent some extra vertical
    allocation that we don't really need, allowing us to reuse it to have a
    less congested desktop.
    
    https://phabricator.endlessm.com/T17658

 js/ui/iconGrid.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index e9229210c0..6aa61fa88a 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -774,7 +774,12 @@ class PaginatedIconGrid extends IconGrid {
         // We want to contain the grid inside the parent box with padding
         this._rowsPerPage = this.rowsForHeight(availHeightPerPage);
         this._nPages = Math.ceil(nRows / this._rowsPerPage);
-        this._spaceBetweenPages = availHeightPerPage - (this.topPadding + this.bottomPadding) - 
this._availableHeightPerPageForItems();
+
+        if (this._nPages > 1)
+            this._spaceBetweenPages = availHeightPerPage - (this.topPadding + this.bottomPadding) - 
this._availableHeightPerPageForItems();
+        else
+            this._spaceBetweenPages = this._getSpacing();
+
         this._childrenPerPage = nColumns * this._rowsPerPage;
     }
 


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