Skip to content

Commit

Permalink
breadcrumbs - fix picker tree height
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Jul 17, 2018
1 parent b7a273b commit 65c06f6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/vs/platform/list/browser/listService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { DefaultController, IControllerOptions, OpenMode, ClickBehavior, Default
import { isUndefinedOrNull } from 'vs/base/common/types';
import { IEditorOptions } from 'vs/platform/editor/common/editor';
import { Event, Emitter } from 'vs/base/common/event';
import { createStyleSheet, addStandardDisposableListener } from 'vs/base/browser/dom';
import { createStyleSheet, addStandardDisposableListener, getTotalHeight } from 'vs/base/browser/dom';
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
import { InputBox, IInputOptions } from 'vs/base/browser/ui/inputbox/inputBox';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
Expand Down Expand Up @@ -605,7 +605,8 @@ export class HighlightingTreeController extends WorkbenchTreeController {

export class HighlightingWorkbenchTree extends WorkbenchTree {

readonly input: InputBox;
protected readonly inputContainer: HTMLElement;
protected readonly input: InputBox;

protected readonly renderer: IHighlightingRenderer;

Expand Down Expand Up @@ -638,6 +639,7 @@ export class HighlightingWorkbenchTree extends WorkbenchTree {
this.renderer = treeConfiguration.renderer;

// create input
this.inputContainer = inputContainer;
this.input = new InputBox(inputContainer, contextViewService, listOptions);
this.input.setEnabled(false);
this.input.onDidChange(this.updateHighlights, this, this.disposables);
Expand Down Expand Up @@ -670,7 +672,7 @@ export class HighlightingWorkbenchTree extends WorkbenchTree {

layout(height?: number, width?: number): void {
this.input.layout();
super.layout(isNaN(height) ? height : height - this.input.height, width);
super.layout(isNaN(height) ? height : height - getTotalHeight(this.inputContainer), width);
}

private lastSelection: any[];
Expand Down

0 comments on commit 65c06f6

Please sign in to comment.