提交 92e6f895 编写于 作者: M Martin Aeschlimann

Support file icons in explorer

上级 f253f94d
......@@ -256,6 +256,11 @@ configurationRegistry.registerConfiguration({
'type': 'boolean',
'description': nls.localize('enableDragAndDrop', "Controls if the explorer should allow to move files and folders via drag and drop."),
'default': true
},
'explorer.fileIcons': {
'type': 'boolean',
'description': nls.localize('fileIcons', "Controls if the explorer shows icons for files and folders. The actual icon set is controled with the 'files.iconSet' setting."),
'default': false
}
}
});
\ No newline at end of file
......@@ -199,6 +199,9 @@ export class ExplorerView extends CollapsibleViewletView {
private onConfigurationUpdated(configuration: IFilesConfiguration, refresh?: boolean): void {
this.autoReveal = configuration && configuration.explorer && configuration.explorer.autoReveal;
let showFileIcons = configuration && configuration.explorer && configuration.explorer.fileIcons;
DOM.toggleClass(this.treeContainer, 'show-file-icons', showFileIcons);
// Push down config updates to components of viewer
let needsRefresh = false;
if (this.filter) {
......
......@@ -341,7 +341,7 @@ export class FileRenderer extends ActionsRenderer implements IRenderer {
return 'folder-icon';
}
return 'text-file-icon';
return 'file-icon';
}
}
......
......@@ -68,6 +68,7 @@ export interface IFilesConfiguration extends IFilesConfiguration, IWorkbenchEdit
};
autoReveal: boolean;
enableDragAndDrop: boolean;
fileIcons: boolean;
};
editor: IEditorOptions;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册