提交 74763fdf 编写于 作者: J Johannes Rieken

make references tree size independent of editor line height, fixes #6742

上级 2ebad4f0
......@@ -332,13 +332,13 @@ class Controller extends DefaultController {
class Renderer extends LegacyRenderer {
private _contextService:IWorkspaceContextService;
constructor(private editor: ICodeEditor, @IWorkspaceContextService contextService:IWorkspaceContextService) {
constructor( @IWorkspaceContextService contextService: IWorkspaceContextService) {
super();
this._contextService = contextService;
}
public getHeight(tree:tree.ITree, element:any):number {
return 1.2 * this.editor.getConfiguration().lineHeight;
public getHeight(tree: tree.ITree, element: any): number {
return 22;
}
protected render(tree:tree.ITree, element:any, container:HTMLElement):tree.IElementCallback {
......@@ -559,7 +559,7 @@ export class ReferenceWidget extends PeekViewWidget {
container.div({ 'class': 'ref-tree inline' }, (div: Builder) => {
var config = {
dataSource: this._instantiationService.createInstance(DataSource),
renderer: this._instantiationService.createInstance(Renderer, this.editor),
renderer: this._instantiationService.createInstance(Renderer),
//sorter: new Sorter(),
controller: new Controller()
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册