🐛 Handle old-style icon colors
This commit is contained in:
parent
301bc2862b
commit
8bdc9f16d8
1 changed files with 3 additions and 1 deletions
|
@ -44,13 +44,15 @@ export const iconDefinitionProvider =
|
||||||
// Check if the path starts with a dot, if so, it's a relative path
|
// Check if the path starts with a dot, if so, it's a relative path
|
||||||
// if not, it's a built-in icon
|
// if not, it's a built-in icon
|
||||||
if (!iconPath.startsWith(".")) {
|
if (!iconPath.startsWith(".")) {
|
||||||
|
// For built-in icons, it's possible that a color is specified, like circle:red, so we need to remove that
|
||||||
|
const parts = iconPath.split(":");
|
||||||
fullIconPath = path.join(
|
fullIconPath = path.join(
|
||||||
(vscode.workspace.workspaceFolders
|
(vscode.workspace.workspaceFolders
|
||||||
? vscode.workspace.workspaceFolders[0].uri.fsPath
|
? vscode.workspace.workspaceFolders[0].uri.fsPath
|
||||||
: "") || "",
|
: "") || "",
|
||||||
"assets",
|
"assets",
|
||||||
"svg",
|
"svg",
|
||||||
iconPath + ".svg"
|
parts[0] + ".svg"
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
fullIconPath = path.join(
|
fullIconPath = path.join(
|
||||||
|
|
Loading…
Reference in a new issue