提交 0057b9d5 编写于 作者: J Johannes Rieken

add setting 'outline.icons', #51864

上级 3fc5520a
......@@ -44,6 +44,11 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).regis
'order': 117,
'type': 'object',
'properties': {
[OutlineConfigKeys.icons]: {
'description': localize('outline.showIcons', "Render Outline Elements with Icons."),
'type': 'boolean',
'default': true
},
[OutlineConfigKeys.problemsEnabled]: {
'description': localize('outline.showProblem', "Show Errors & Warnings on Outline Elements."),
'type': 'boolean',
......
......@@ -12,6 +12,7 @@ export const OutlineViewFiltered = new RawContextKey('outlineFiltered', false);
export const OutlineViewFocused = new RawContextKey('outlineFocused', false);
export enum OutlineConfigKeys {
'icons' = 'outline.icons',
'problemsEnabled' = 'outline.problems.enabled',
'problemsColors' = 'outline.problems.colors',
'problemsBadges' = 'outline.problems.badges'
......
......@@ -87,6 +87,10 @@
padding-right: 3px;
}
.monaco-workbench .outline-panel.no-icons .outline-element .outline-element-icon {
display: none;
}
.monaco-workbench .outline-panel .outline-element .outline-element-label {
text-overflow: ellipsis;
overflow: hidden;
......
......@@ -356,6 +356,14 @@ export class OutlinePanel extends ViewletPanel {
this._disposables.push(this._tree, this._input);
this._disposables.push(this._outlineViewState.onDidChange(this._onDidChangeUserState, this));
// feature: toggle icons
dom.toggleClass(this._domNode, 'no-icons', !this._configurationService.getValue(OutlineConfigKeys.icons));
this.disposables.push(this._configurationService.onDidChangeConfiguration(e => {
if (e.affectsConfiguration(OutlineConfigKeys.icons)) {
dom.toggleClass(this._domNode, 'no-icons', !this._configurationService.getValue(OutlineConfigKeys.icons));
}
}));
}
protected layoutBody(height: number = this._cachedHeight): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册