iconGrid: Handle preferred height requests for infinite widths
Request enough height to fit all children in a single line instead of requesting 0. https://bugzilla.gnome.org/show_bug.cgi?id=679168
This commit is contained in:
parent
1d7c2b1c26
commit
c985fdccba
@ -198,7 +198,11 @@ const IconGrid = new Lang.Class({
|
||||
|
||||
_getPreferredHeight: function (grid, forWidth, alloc) {
|
||||
let children = this._getVisibleChildren();
|
||||
let [nColumns, usedWidth] = this._computeLayout(forWidth);
|
||||
let nColumns;
|
||||
if (forWidth < 0)
|
||||
nColumns = children.length;
|
||||
else
|
||||
nColumns = this._computeLayout(forWidth)[0];
|
||||
let nRows;
|
||||
if (nColumns > 0)
|
||||
nRows = Math.ceil(children.length / nColumns);
|
||||
|
Loading…
Reference in New Issue
Block a user