提交 a640c861 编写于 作者: B Benjamin Pasero

title - opacity for inactive windows

上级 d5e8fcf5
......@@ -37,11 +37,19 @@
color: #333333;
}
.vs .monaco-workbench > .part.titlebar.blurred {
opacity: 0.6;
}
.vs-dark .monaco-workbench > .part.titlebar {
background: #3c3c3c;
color: #ccc;
}
.vs-dark .monaco-workbench > .part.titlebar.blurred > .window-title {
opacity: 0.6;
}
.hc-black .monaco-workbench > .part.titlebar {
background: #000;
color: white;
......
......@@ -36,6 +36,13 @@ export class TitlebarPart extends Part implements ITitleService {
@IWindowsService private windowsService: IWindowsService
) {
super(id);
this.registerListeners();
}
private registerListeners(): void {
this.toUnbind.push(DOM.addDisposableListener(window, DOM.EventType.BLUR, () => { if (this.titleContainer) { this.titleContainer.addClass('blurred'); } }));
this.toUnbind.push(DOM.addDisposableListener(window, DOM.EventType.FOCUS, () => { if (this.titleContainer) { this.titleContainer.removeClass('blurred'); } }));
}
public createContentArea(parent: Builder): Builder {
......
......@@ -103,8 +103,8 @@ export abstract class TextFileService implements ITextFileService {
this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(e.config)));
// Application & Editor focus change
this.toUnbind.push(DOM.addDisposableListener(window, 'blur', () => this.onWindowFocusLost()));
this.toUnbind.push(DOM.addDisposableListener(window, 'blur', () => this.onEditorFocusChanged(), true));
this.toUnbind.push(DOM.addDisposableListener(window, DOM.EventType.BLUR, () => this.onWindowFocusLost()));
this.toUnbind.push(DOM.addDisposableListener(window, DOM.EventType.BLUR, () => this.onEditorFocusChanged(), true));
this.toUnbind.push(this.editorGroupService.onEditorsChanged(() => this.onEditorFocusChanged()));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册