Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vscode] support theme icons #8267

Merged
merged 1 commit into from
Jul 30, 2020
Merged

[vscode] support theme icons #8267

merged 1 commit into from
Jul 30, 2020

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Jul 30, 2020

What it does

Screenshot 2020-07-30 at 08 59 37

How to test

Review checklist

Reminder for reviewers

@akosyakov akosyakov added theming issues related to theming vscode issues related to VSCode compatibility labels Jul 30, 2020
themeIcon = icon;
} else {
iconUrl = this.toPluginUrl(pck, icon);
}
} else {
iconUrl = {
light: this.toPluginUrl(pck, icon.light),
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess since icons from the theme implicitly have a light/dark form, it would be wrong to reference them here, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, checked with VS Code that it does not expect codeicons here

packages/plugin-ext/src/common/plugin-api-rpc.ts Outdated Show resolved Hide resolved
@@ -43,8 +43,11 @@ export class PluginTreeViewNodeLabelProvider implements LabelProviderContributio
return node.icon;
}
if (node.themeIconId) {
const uri = node.resourceUri && new URI(node.resourceUri) || undefined;
return this.labelProvider.getIcon(URIIconReference.create(node.themeIconId, uri));
if (node.themeIconId === 'file' || node.themeIconId === 'folder') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these two special-cased so we can get stuff like the "Java" icon for *.java files?

Copy link
Member Author

Choose a reason for hiding this comment

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

correct

@tsmaeder tsmaeder self-requested a review July 30, 2020 08:05
Copy link
Contributor

@tsmaeder tsmaeder left a comment

Choose a reason for hiding this comment

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

Tested on Windows with the java test runner: lgtm.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
@akosyakov akosyakov merged commit c6735b7 into master Jul 30, 2020
@akosyakov akosyakov deleted the ak/support_theme_icons branch July 30, 2020 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theming issues related to theming vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support VS Code Standard Icons in Contributions
2 participants