Skip to content

Commit

Permalink
fix blank square plugins icon when theia starts
Browse files Browse the repository at this point in the history
Signed-off-by: Doron Nahari <[email protected]>
  • Loading branch information
DoroNahari committed May 6, 2020
1 parent 3d17ad2 commit 0fe99a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/plugin-ext/src/main/browser/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
flex-direction: column;
}

.theia-plugin-view-container {
-webkit-mask: url('');
mask: url('');
}

.theia-plugin-test-tab-icon {
-webkit-mask: url('test.svg');
mask: url('test.svg');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,16 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
return Disposable.NULL;
}
const toDispose = new DisposableCollection();
const containerClass = 'plugin-view-container';
const iconClass = 'plugin-view-container-icon-' + viewContainer.id;
const iconUrl = new Endpoint({ path: viewContainer.iconUrl }).getRestUrl().toString();
toDispose.push(this.style.insertRule('.' + iconClass, () => `
toDispose.push(this.style.insertRule('.' + containerClass + '.' + iconClass, () => `
mask: url('${iconUrl}') no-repeat 50% 50%;
-webkit-mask: url('${iconUrl}') no-repeat 50% 50%;
`));
toDispose.push(this.doRegisterViewContainer(viewContainer.id, location, {
label: viewContainer.title,
iconClass,
iconClass: containerClass + ' ' + iconClass,
closeable: true
}));
return toDispose;
Expand Down

0 comments on commit 0fe99a7

Please sign in to comment.