Skip to content

Commit 58e6b8f

Browse files
committed
happy holidays fellow!
1 parent d6428a8 commit 58e6b8f

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/vs/workbench/parts/holidays/electron-browser/holidays.contribution.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { IDisposable, toDisposable, dispose, Disposable } from 'vs/base/common/l
1414
import { Registry } from 'vs/platform/registry/common/platform';
1515
import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
1616
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
17-
import { IThemeService } from 'vs/platform/theme/common/themeService';
1817

1918
function animate(drawFn: () => void): IDisposable {
2019
let disposed = false;
@@ -35,7 +34,7 @@ function animate(drawFn: () => void): IDisposable {
3534
});
3635
}
3736

38-
function makeItSnow(canvas: HTMLCanvasElement, dark: boolean): IDisposable {
37+
function makeItSnow(canvas: HTMLCanvasElement): IDisposable {
3938
const ctx = canvas.getContext('2d')!;
4039
const flakes: any[] = [];
4140

@@ -51,7 +50,7 @@ function makeItSnow(canvas: HTMLCanvasElement, dark: boolean): IDisposable {
5150
vx: (-(0.5 * distance)) * window.devicePixelRatio,
5251
vy: (0.2 + 1.5 * distance) * window.devicePixelRatio,
5352
size: (2 + 2 * distance) * window.devicePixelRatio,
54-
color: dark ? (170 + distance * 50) : (200 - distance * 50)
53+
color: 170 + distance * 50
5554
});
5655
}
5756

@@ -90,8 +89,7 @@ export class HappyHolidaysAction extends Action {
9089

9190
constructor(
9291
id: string,
93-
label: string,
94-
@IThemeService private themeService: IThemeService
92+
label: string
9593
) {
9694
super(id, label, '', true);
9795
}
@@ -111,7 +109,7 @@ export class HappyHolidaysAction extends Action {
111109
canvas.height = document.body.clientHeight * window.devicePixelRatio;
112110
canvas.style.width = `${document.body.clientWidth}px`;
113111
canvas.style.height = `${document.body.clientHeight}px`;
114-
disposables.push(makeItSnow(canvas, this.themeService.getTheme().type !== 'light'));
112+
disposables.push(makeItSnow(canvas));
115113

116114
const text = append(el, $('.happy-holidays-text'));
117115
text.innerText = `The VS Code team wishes you a great Holiday season!`;

src/vs/workbench/parts/holidays/electron-browser/media/holidays.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
}
2222

2323
.monaco-workbench.blur {
24+
filter: blur(5px) brightness(60%);
25+
}
26+
27+
.vs-dark .monaco-workbench.blur {
2428
filter: blur(5px);
2529
}
2630

@@ -49,6 +53,7 @@
4953
transition-duration: 0.8s;
5054
transition-property: transform, opacity;
5155
transition-timing-function: ease-out;
56+
color: #ddd;
5257
}
5358

5459
.happy-holidays-text.animate {

0 commit comments

Comments
 (0)