[gnome-shell/T27795: 108/138] iconGrid: Don't compute any space between pages when there's only one page
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/T27795: 108/138] iconGrid: Don't compute any space between pages when there's only one page
- Date: Tue, 1 Oct 2019 23:38:24 +0000 (UTC)
commit 70e727e7fa8a4421a231a9e5bf10b11262d03bb9
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 04a2b011b1..ed5dd1eb91 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -791,7 +791,12 @@ var PaginatedIconGrid = GObject.registerClass({
// 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]