Skip to content

Commit

Permalink
ThemeIcon ThemeColor proposed API changes
Browse files Browse the repository at this point in the history
Part of #103120
  • Loading branch information
alexr00 committed Sep 23, 2020
1 parent 6891688 commit b775976
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 10 additions & 3 deletions src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2169,11 +2169,18 @@ declare module 'vscode' {

//#region https://github.com/microsoft/vscode/issues/103120 @alexr00
export class ThemeIcon2 extends ThemeIcon {

/**
* The id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html.
*/
public readonly id: string;

/**
* Returns a new `ThemeIcon` that will use the specified `ThemeColor`
* @param color The `ThemeColor` to use for the icon.
* Creates a reference to a theme icon.
* @param id id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html.
* @param color optional `ThemeColor` for the icon.
*/
with(color: ThemeColor): ThemeIcon2;
constructor(id: string, color?: ThemeColor);
}
//#endregion
}
4 changes: 0 additions & 4 deletions src/vs/workbench/api/common/extHostTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2177,10 +2177,6 @@ export class ThemeIcon {
this.id = id;
this.themeColor = color;
}

with(color: ThemeColor): ThemeIcon {
return new ThemeIcon(this.id, color);
}
}
ThemeIcon.File = new ThemeIcon('file');
ThemeIcon.Folder = new ThemeIcon('folder');
Expand Down

1 comment on commit b775976

@alexr00
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aeschli FYI

Please sign in to comment.