Switch GenericDisplay to ShellOverflowList for dynamic height

This converts GenericDisplay to totally dynamic layout, where
we display as many items as we can, and the rest cleanly overflow
into pages.

For now, remove multi-column; to readd this, we can pack multiple
display items into a single ShellOverflowList item.
This commit is contained in:
Colin Walters
2009-07-04 15:30:12 -04:00
parent a1908d9db1
commit 15e862f974
4 changed files with 61 additions and 108 deletions

View File

@ -169,15 +169,15 @@ Signals.addSignalMethods(MenuItem.prototype);
*
* width - width available for the display
*/
function AppDisplay(width, numberOfColumns, columnGap) {
this._init(width, numberOfColumns, columnGap);
function AppDisplay(width) {
this._init(width);
}
AppDisplay.prototype = {
__proto__: GenericDisplay.GenericDisplay.prototype,
_init : function(width, numberOfColumns, columnGap) {
GenericDisplay.GenericDisplay.prototype._init.call(this, width, numberOfColumns, columnGap);
_init : function(width) {
GenericDisplay.GenericDisplay.prototype._init.call(this, width);
this._menus = [];
this._menuDisplays = [];
@ -429,8 +429,8 @@ AppDisplay.prototype = {
},
// Creates an AppDisplayItem based on itemInfo, which is expected be an AppInfo object.
_createDisplayItem: function(itemInfo) {
return new AppDisplayItem(itemInfo, this._columnWidth);
_createDisplayItem: function(itemInfo, width) {
return new AppDisplayItem(itemInfo, width);
}
};