Skip to content

Commit

Permalink
Fixes microsoft#18941 Blurs the background editor in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
bgashler1 committed Jan 21, 2017
1 parent 4e6b601 commit a5c6fa7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/vs/workbench/parts/welcomeOverlay/browser/welcomeOverlay.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@
background: rgba(0,0,0,0.5);
}

#workbench\.parts\.editor {
transition: filter .25s, opacity .2s;
}

#workbench\.parts\.editor.blur-background {
filter: blur(3px);
opacity: .28;
}

.hc-black #workbench\.parts\.editor.blur-background {
opacity: .2;
}

.monaco-workbench > .welcomeOverlay > .key {
font-family: "Lucida Grande", sans-serif;
font-size: 20px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import 'vs/css!./welcomeOverlay';
import { $ } from 'vs/base/browser/builder';
import * as dom from 'vs/base/browser/dom';
import * as errors from 'vs/base/common/errors';
import { Registry } from 'vs/platform/platform';
import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
Expand Down Expand Up @@ -94,7 +95,9 @@ export class WelcomeOverlayAction extends Action {

public run(): TPromise<void> {
const welcomeOverlay = document.querySelector('.monaco-workbench > .welcomeOverlay') as HTMLDivElement;
const welcomePage = document.getElementById('workbench.parts.editor') as HTMLDivElement;
welcomeOverlay.style.display = 'block';
dom.addClass(welcomePage, 'blur-background');
return null;
}
}
Expand Down Expand Up @@ -124,6 +127,8 @@ export class WelcomeOverlayContribution implements IWorkbenchContribution {

overlay.on('click', () => {
overlay.display('none');
const welcomePage = document.getElementById('workbench.parts.editor') as HTMLDivElement;
dom.removeClass(welcomePage, 'blur-background');
});

const editorOpen = !!this.editorService.getVisibleEditors().length;
Expand Down

0 comments on commit a5c6fa7

Please sign in to comment.