mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 16:25:00 +01:00
Merge pull request #305661 from microsoft/benibenj/planned-haddock
Fix CI widget layout
This commit is contained in:
@@ -330,21 +330,11 @@ export class CIStatusWidget extends Disposable {
|
||||
* Layout the widget body list to the given height.
|
||||
* Called by the parent view after computing available space.
|
||||
*/
|
||||
layout(maxBodyHeight: number): void {
|
||||
if (this._checkCount === 0) {
|
||||
return;
|
||||
}
|
||||
const contentHeight = this._checkCount * CICheckListDelegate.ITEM_HEIGHT;
|
||||
const bodyHeight = Math.min(contentHeight, maxBodyHeight);
|
||||
this._list.getHTMLElement().style.height = `${bodyHeight}px`;
|
||||
this._list.layout(bodyHeight);
|
||||
layout(height: number): void {
|
||||
this._list.layout(height);
|
||||
}
|
||||
|
||||
private _renderBody(checks: readonly ICICheckListItem[]): void {
|
||||
const contentHeight = checks.length * CICheckListDelegate.ITEM_HEIGHT;
|
||||
const bodyHeight = Math.min(contentHeight, CIStatusWidget.MAX_BODY_HEIGHT);
|
||||
this._list.getHTMLElement().style.height = `${bodyHeight}px`;
|
||||
this._list.layout(bodyHeight);
|
||||
this._list.splice(0, this._list.length, checks);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user