提交 05ec1950 编写于 作者: C Christof Marti

Add CSS class when icons are shown (fixes #19501)

上级 f08d5d6e
......@@ -139,7 +139,7 @@
white-space: pre;
}
.show-file-icons .vs_code_editor_walkthrough\.md-name-file-icon.md-ext-file-icon.markdown-lang-file-icon.file-icon::before {
.file-icons-enabled .show-file-icons .vs_code_editor_walkthrough\.md-name-file-icon.md-ext-file-icon.markdown-lang-file-icon.file-icon::before {
content: ' ';
background-image: url('../../../../../../resources/code-icon.svg');
}
......
......@@ -258,7 +258,7 @@
display: none;
}
.show-file-icons .vs_code_welcome_page\.html-name-file-icon.html-ext-file-icon.html-lang-file-icon.file-icon::before {
.file-icons-enabled .show-file-icons .vs_code_welcome_page\.html-name-file-icon.html-ext-file-icon.html-lang-file-icon.file-icon::before {
content: ' ';
background-image: url('../../../../../../resources/code-icon.svg');
}
......
......@@ -41,6 +41,8 @@ let defaultBaseTheme = getBaseThemeId(DEFAULT_THEME_ID);
const defaultThemeExtensionId = 'vscode-theme-defaults';
const oldDefaultThemeExtensionId = 'vscode-theme-colorful-defaults';
const fileIconsEnabledClass = 'file-icons-enabled';
function validateThemeId(theme: string): string {
// migrations
switch (theme) {
......@@ -496,6 +498,13 @@ export class ThemeService implements IThemeService {
} else {
this.currentIconTheme = noFileIconTheme;
}
if (this.container) {
if (newIconTheme) {
$(this.container).addClass(fileIconsEnabledClass);
} else {
$(this.container).removeClass(fileIconsEnabledClass);
}
}
this.storageService.store(ICON_THEME_PREF, this.currentIconTheme.id, StorageScope.GLOBAL);
if (broadcastToAllWindows) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册