From e28dae3331c949458d9cd0a65c2f50a335954e5a Mon Sep 17 00:00:00 2001 From: Doron Nahari Date: Wed, 6 May 2020 17:28:10 +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..1b3f4740c1be7 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 = 'theia-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;