Fix the height allocated to the results sections

The results sections no longer include a label on top of them, so the
height of that label needs to be subtracted when specifying the height
for the sections. This ensures that display controls are positioned
correctly on the bottom of the section.
This commit is contained in:
Marina Zhurakhinskaya 2009-06-18 20:01:49 -04:00 committed by Colin Walters
parent 98c5f35324
commit e1fa61cd58

View File

@ -312,8 +312,10 @@ Dash.prototype = {
this._docsSectionDefaultHeight = this._docsSection.height;
// The "more"/result area
this._resultsAppsSection = new AppResults(this._displayWidth, resultsHeight);
this._resultsDocsSection = new DocResults(this._displayWidth, resultsHeight);
// This area does not include this._resultsText which is part of resultsHeight, so we need to subtract the height
// of that text from the resultsHeight.
this._resultsAppsSection = new AppResults(this._displayWidth, resultsHeight - LABEL_HEIGHT - DASH_SECTION_PADDING);
this._resultsDocsSection = new DocResults(this._displayWidth, resultsHeight - LABEL_HEIGHT - DASH_SECTION_PADDING);
this._resultsPane = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL,
x: this._width,