提交 389f5b2b 编写于 作者: M Martin Aeschlimann

[icons] support icons for expanded folders by name

上级 f221ef23
......@@ -149,6 +149,7 @@ interface IconsAssociation {
file?: string;
folderExpanded?: string;
folderNames?: {[folderName:string]: string; };
folderNamesExpanded?: {[folderName:string]: string; };
fileExtensions?: {[extension:string]: string; };
fileNames?: {[fileName:string]: string; };
languageIds?: {[languageId:string]: string; };
......@@ -512,6 +513,12 @@ function _processIconThemeDocument(id: string, iconThemeDocumentPath: string, ic
addSelector(`${qualifier} .${escapeCSS(folderName.toLowerCase())}-name-folder-icon.folder-icon::before`, folderNames[folderName]);
}
}
let folderNamesExpanded = associations.folderNamesExpanded;
if (folderNamesExpanded) {
for (let folderName in folderNamesExpanded) {
addSelector(`${qualifier} .expanded .${escapeCSS(folderName.toLowerCase())}-name-folder-icon.folder-icon::before`, folderNames[folderName]);
}
}
let fileExtensions = associations.fileExtensions;
if (fileExtensions) {
for (let fileExtension in fileExtensions) {
......@@ -844,6 +851,14 @@ const schema: IJSONSchema = {
description: nls.localize('schema.folderName', 'The ID of the icon definition for the association.')
}
},
folderNamesExpanded: {
type: 'object',
description: nls.localize('schema.folderNamesExpanded', 'Associates folder names to icons for expanded folders. The object key is is the folder name, not including any path segments. No patterns or wildcards are allowed. Folder name matching is case insensitive.'),
additionalProperties: {
type: 'string',
description: nls.localize('schema.folderNameExpanded', 'The ID of the icon definition for the association.')
}
},
fileExtensions: {
type: 'object',
description: nls.localize('schema.fileExtensions', 'Associates file extensions to icons. The object key is is the file extension name. The extension name is the last segment of a file name after the last dot (not including the dot). Extensions are compared case insensitive.'),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册