From 0fe99a7271ba7f4c752908bdf911185cd11e5c8a Mon Sep 17 00:00:00 2001 From: Doron Nahari Date: Wed, 6 May 2020 16:46:46 +0300 Subject: [PATCH] fix blank square plugins icon when theia starts Signed-off-by: Doron Nahari --- packages/plugin-ext/src/main/browser/style/index.css | 5 +++++ .../plugin-ext/src/main/browser/view/plugin-view-registry.ts | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/plugin-ext/src/main/browser/style/index.css b/packages/plugin-ext/src/main/browser/style/index.css index 70d8de73acf43..854414a82431d 100644 --- a/packages/plugin-ext/src/main/browser/style/index.css +++ b/packages/plugin-ext/src/main/browser/style/index.css @@ -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'); diff --git a/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts b/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts index 4a3b2d45589d2..c67e0a52f80dd 100644 --- a/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts +++ b/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts @@ -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;