diff --git a/src/main.js b/src/main.js --- a/src/main.js +++ b/src/main.js @@ -157,6 +157,10 @@ } } }); + // enable transparent + app.commandLine.appendSwitch('enable-transparent-visuals'); + app.commandLine.appendSwitch('disable-gpu'); + // Support JS Flags const jsFlags = getJSFlags(cliArgs); if (jsFlags) { diff --git a/src/vs/platform/windows/electron-main/window.ts b/src/vs/platform/windows/electron-main/window.ts --- a/src/vs/platform/windows/electron-main/window.ts +++ b/src/vs/platform/windows/electron-main/window.ts @@ -157,7 +157,8 @@ width: this.windowState.width, height: this.windowState.height, x: this.windowState.x, y: this.windowState.y, - backgroundColor: this.themeMainService.getBackgroundColor(), + transparent: true, + backgroundColor: '#00000000' || this.themeMainService.getBackgroundColor(), minWidth: WindowMinimumSize.WIDTH, minHeight: WindowMinimumSize.HEIGHT, show: !isFullscreenOrMaximized, diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts --- a/src/vs/workbench/common/theme.ts 2020-04-21 11:28:02.140938188 +0800 +++ b/src/vs/workbench/common/theme.ts 2020-04-21 11:36:36.133491755 +0800 @@ -6,20 +6,24 @@ import { localize } from 'vs/nls'; import { registerColor, editorBackground, contrastBorder, transparent, editorWidgetBackground, textLinkForeground, lighten, darken, focusBorder, activeContrastBorder, editorWidgetForeground, editorErrorForeground, editorWarningForeground, editorInfoForeground } from 'vs/platform/theme/common/colorRegistry'; import { IColorTheme } from 'vs/platform/theme/common/themeService'; -import { Color } from 'vs/base/common/color'; +import { Color, RGBA } from 'vs/base/common/color'; // < --- Workbench (not customizable) --- > -export function WORKBENCH_BACKGROUND(theme: IColorTheme): Color { - switch (theme.type) { - case 'dark': - return Color.fromHex('#252526'); - case 'light': - return Color.fromHex('#F3F3F3'); - default: - return Color.fromHex('#000000'); - } -} +export const WORKBENCH_BACKGROUND = (theme: IColorTheme) => theme.getColor( + registerColor( + 'workbench.background', + { + dark: '#252526', + light: '#F3F3F3', + hc: '#000000' + }, + localize( + 'workbenchBackground', + 'Top-level background color. Not seen unless other elements have a transparent color.' + ) + ) +) || new Color(new RGBA(0, 0, 0, 0)); // < --- Tabs --- > diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -466,6 +466,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance { macOptionIsMeta: config.macOptionIsMeta, macOptionClickForcesSelection: config.macOptionClickForcesSelection, rightClickSelectsWord: config.rightClickBehavior === 'selectWord', + allowTransparency: true, fastScrollModifier: 'alt', fastScrollSensitivity: editorOptions.fastScrollSensitivity, scrollSensitivity: editorOptions.mouseWheelScrollSensitivity,