提交 99fea39b 编写于 作者: I isidor

remove explorer.openEditors.dynamicHeight

fixes #40638
上级 0b9b3360
......@@ -77,7 +77,6 @@ export interface IFilesConfiguration extends IFilesConfiguration, IWorkbenchEdit
explorer: {
openEditors: {
visible: number;
dynamicHeight: boolean;
};
autoReveal: boolean;
enableDragAndDrop: boolean;
......
......@@ -306,11 +306,6 @@ configurationRegistry.registerConfiguration({
'description': nls.localize({ key: 'openEditorsVisible', comment: ['Open is an adjective'] }, "Number of editors shown in the Open Editors pane. Set it to 0 to hide the pane."),
'default': 9
},
'explorer.openEditors.dynamicHeight': {
'type': 'boolean',
'description': nls.localize({ key: 'dynamicHeight', comment: ['Open is an adjective'] }, "Controls if the height of the open editors section should adapt dynamically to the number of elements or not."),
'default': true
},
'explorer.autoReveal': {
'type': 'boolean',
'description': nls.localize('autoReveal', "Controls if the explorer should automatically reveal and select files when opening them."),
......
......@@ -51,7 +51,6 @@ const $ = dom.$;
export class OpenEditorsView extends ViewsViewletPanel {
private static readonly DEFAULT_VISIBLE_OPEN_EDITORS = 9;
private static readonly DEFAULT_DYNAMIC_HEIGHT = true;
static readonly ID = 'workbench.explorer.openEditorsView';
static NAME = nls.localize({ key: 'openEditors', comment: ['Open is an adjective'] }, "Open Editors");
......@@ -381,22 +380,11 @@ export class OpenEditorsView extends ViewsViewletPanel {
visibleOpenEditors = OpenEditorsView.DEFAULT_VISIBLE_OPEN_EDITORS;
}
let dynamicHeight = this.configurationService.getValue<boolean>('explorer.openEditors.dynamicHeight');
if (typeof dynamicHeight !== 'boolean') {
dynamicHeight = OpenEditorsView.DEFAULT_DYNAMIC_HEIGHT;
}
return this.computeMinExpandedBodySize(visibleOpenEditors, dynamicHeight);
return this.computeMinExpandedBodySize(visibleOpenEditors);
}
private computeMinExpandedBodySize(visibleOpenEditors = OpenEditorsView.DEFAULT_VISIBLE_OPEN_EDITORS, dynamicHeight = OpenEditorsView.DEFAULT_DYNAMIC_HEIGHT): number {
let itemsToShow: number;
if (dynamicHeight) {
itemsToShow = Math.min(Math.max(visibleOpenEditors, 1), this.elementCount);
} else {
itemsToShow = Math.max(visibleOpenEditors, 1);
}
private computeMinExpandedBodySize(visibleOpenEditors = OpenEditorsView.DEFAULT_VISIBLE_OPEN_EDITORS): number {
const itemsToShow = Math.min(Math.max(visibleOpenEditors, 1), this.elementCount);
return itemsToShow * OpenEditorsDelegate.ITEM_HEIGHT;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册