searchDisplay: Use the rowLimit we pass to the IconGrid
When displaying children, we need to make sure that we use the rowLimit property that we pass to iconGrid, rather than assuming that it's always MAX_SEARCH_RESULTS_ROWS in case some subclass (in an extension maybe) wants to do something different. https://bugzilla.gnome.org/show_bug.cgi?id=675527
This commit is contained in:
parent
465556f0d8
commit
c1f51a7bf3
@ -282,6 +282,10 @@ const IconGrid = new Lang.Class({
|
|||||||
return this._computeLayout(rowWidth)[0];
|
return this._computeLayout(rowWidth)[0];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getRowLimit: function() {
|
||||||
|
return this._rowLimit;
|
||||||
|
},
|
||||||
|
|
||||||
_computeLayout: function (forWidth) {
|
_computeLayout: function (forWidth) {
|
||||||
let nColumns = 0;
|
let nColumns = 0;
|
||||||
let usedWidth = 0;
|
let usedWidth = 0;
|
||||||
|
@ -131,7 +131,7 @@ const GridSearchResults = new Lang.Class({
|
|||||||
|
|
||||||
getResultsForDisplay: function() {
|
getResultsForDisplay: function() {
|
||||||
let alreadyVisible = this._pendingClear ? 0 : this._grid.visibleItemsCount();
|
let alreadyVisible = this._pendingClear ? 0 : this._grid.visibleItemsCount();
|
||||||
let canDisplay = this._grid.childrenInRow(this._width) * MAX_SEARCH_RESULTS_ROWS
|
let canDisplay = this._grid.childrenInRow(this._width) * this._grid.getRowLimit()
|
||||||
- alreadyVisible;
|
- alreadyVisible;
|
||||||
|
|
||||||
let numResults = Math.min(this._notDisplayedResult.length, canDisplay);
|
let numResults = Math.min(this._notDisplayedResult.length, canDisplay);
|
||||||
|
Loading…
Reference in New Issue
Block a user