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

grid - restore watermark and letterpress support

上级 d0274c04
...@@ -14,6 +14,7 @@ import { Extensions, IColorRegistry, ColorIdentifier } from 'vs/platform/theme/c ...@@ -14,6 +14,7 @@ import { Extensions, IColorRegistry, ColorIdentifier } from 'vs/platform/theme/c
import { Extensions as ThemingExtensions, IThemingRegistry, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { Extensions as ThemingExtensions, IThemingRegistry, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { Registry } from 'vs/platform/registry/common/platform'; import { Registry } from 'vs/platform/registry/common/platform';
import { Event, Emitter } from 'vs/base/common/event'; import { Event, Emitter } from 'vs/base/common/event';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
const VS_THEME_NAME = 'vs'; const VS_THEME_NAME = 'vs';
const VS_DARK_THEME_NAME = 'vs-dark'; const VS_DARK_THEME_NAME = 'vs-dark';
...@@ -119,7 +120,7 @@ export class StandaloneThemeServiceImpl implements IStandaloneThemeService { ...@@ -119,7 +120,7 @@ export class StandaloneThemeServiceImpl implements IStandaloneThemeService {
private _styleElement: HTMLStyleElement; private _styleElement: HTMLStyleElement;
private _theme: IStandaloneTheme; private _theme: IStandaloneTheme;
private readonly _onThemeChange: Emitter<IStandaloneTheme>; private readonly _onThemeChange: Emitter<IStandaloneTheme>;
private environment: IEnvironmentService = Object.create(null);
constructor() { constructor() {
this._onThemeChange = new Emitter<IStandaloneTheme>(); this._onThemeChange = new Emitter<IStandaloneTheme>();
...@@ -185,7 +186,7 @@ export class StandaloneThemeServiceImpl implements IStandaloneThemeService { ...@@ -185,7 +186,7 @@ export class StandaloneThemeServiceImpl implements IStandaloneThemeService {
} }
} }
}; };
themingRegistry.getThemingParticipants().forEach(p => p(theme, ruleCollector)); themingRegistry.getThemingParticipants().forEach(p => p(theme, ruleCollector, this.environment));
let tokenTheme = theme.tokenTheme; let tokenTheme = theme.tokenTheme;
let colorMap = tokenTheme.getColorMap(); let colorMap = tokenTheme.getColorMap();
......
...@@ -10,6 +10,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; ...@@ -10,6 +10,7 @@ import { IDisposable } from 'vs/base/common/lifecycle';
import * as platform from 'vs/platform/registry/common/platform'; import * as platform from 'vs/platform/registry/common/platform';
import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry';
import { Event, Emitter } from 'vs/base/common/event'; import { Event, Emitter } from 'vs/base/common/event';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
export const IThemeService = createDecorator<IThemeService>('themeService'); export const IThemeService = createDecorator<IThemeService>('themeService');
...@@ -66,7 +67,7 @@ export interface ICssStyleCollector { ...@@ -66,7 +67,7 @@ export interface ICssStyleCollector {
} }
export interface IThemingParticipant { export interface IThemingParticipant {
(theme: ITheme, collector: ICssStyleCollector): void; (theme: ITheme, collector: ICssStyleCollector, environment: IEnvironmentService): void;
} }
export interface IThemeService { export interface IThemeService {
......
...@@ -78,18 +78,6 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService ...@@ -78,18 +78,6 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
//#endregion //#endregion
//#region TODO@grid watermark (do this from the outside? what about background color for empt root view?)
private initStyles(): void {
// Letterpress Background when Empty
createCSSRule('.vs .monaco-workbench > .part.editor.empty', `background-image: url('${join(this.environmentService.appRoot, 'resources/letterpress.svg')}')`);
createCSSRule('.vs-dark .monaco-workbench > .part.editor.empty', `background-image: url('${join(this.environmentService.appRoot, 'resources/letterpress-dark.svg')}')`);
createCSSRule('.hc-black .monaco-workbench > .part.editor.empty', `background-image: url('${join(this.environmentService.appRoot, 'resources/letterpress-hc.svg')}')`);
}
//#endregion
//#region TODO@grid closeEditors() //#region TODO@grid closeEditors()
public closeEditors(positions?: Position[]): TPromise<void>; public closeEditors(positions?: Position[]): TPromise<void>;
...@@ -750,6 +738,14 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService ...@@ -750,6 +738,14 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
this.registerListeners(); this.registerListeners();
} }
private initStyles(): void {
// Letterpress Background when Empty
createCSSRule('.vs .monaco-workbench > .part.editor.empty', `background-image: url('${join(this.environmentService.appRoot, 'resources/letterpress.svg')}')`);
createCSSRule('.vs-dark .monaco-workbench > .part.editor.empty', `background-image: url('${join(this.environmentService.appRoot, 'resources/letterpress-dark.svg')}')`);
createCSSRule('.hc-black .monaco-workbench > .part.editor.empty', `background-image: url('${join(this.environmentService.appRoot, 'resources/letterpress-hc.svg')}')`);
}
public hideTabs(forceHide: boolean): void { public hideTabs(forceHide: boolean): void {
this.forceHideTabs = forceHide; this.forceHideTabs = forceHide;
const config = this.configurationService.getValue<IWorkbenchEditorConfiguration>(); const config = this.configurationService.getValue<IWorkbenchEditorConfiguration>();
......
...@@ -7,6 +7,16 @@ ...@@ -7,6 +7,16 @@
height: 100%; height: 100%;
} }
.monaco-workbench > .part.editor > .content .editor-group-container.empty {
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: 15%;
}
.monaco-workbench > .part.editor > .content.empty .editor-group-container.empty {
background-size: 260px 260px; /* larger for empty editor part */
}
.monaco-workbench > .part.editor > .content .editor-group-container.empty.active { .monaco-workbench > .part.editor > .content .editor-group-container.empty.active {
outline-width: 1px; outline-width: 1px;
outline-style: solid; outline-style: solid;
......
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/* Letter press styling for empty editor */
.monaco-workbench > .part.editor.empty {
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: 260px 260px;
}
...@@ -88,7 +88,7 @@ export class GridOpenOneEditorAction extends Action { ...@@ -88,7 +88,7 @@ export class GridOpenOneEditorAction extends Action {
} }
run(): TPromise<any> { run(): TPromise<any> {
const path = join(process.cwd(), 'src/vs/workbench/browser/parts/editor2/editor2.contribution.ts'); const path = join(process.cwd(), 'src/vs/workbench/browser/parts/editor/editor.contribution.ts');
this.nextEditorGroupsService.activeGroup.openEditor(this.legacyEditorService.createInput({ resource: URI.file(path) }) as EditorInput); this.nextEditorGroupsService.activeGroup.openEditor(this.legacyEditorService.createInput({ resource: URI.file(path) }) as EditorInput);
return TPromise.as(void 0); return TPromise.as(void 0);
......
...@@ -16,9 +16,9 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle ...@@ -16,9 +16,9 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar'; import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar';
import { attachProgressBarStyler } from 'vs/platform/theme/common/styler'; import { attachProgressBarStyler } from 'vs/platform/theme/common/styler';
import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { editorBackground, contrastBorder, focusBorder } from 'vs/platform/theme/common/colorRegistry'; import { editorBackground, contrastBorder, focusBorder } from 'vs/platform/theme/common/colorRegistry';
import { Themable, EDITOR_GROUP_HEADER_TABS_BORDER, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_BACKGROUND, EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND } from 'vs/workbench/common/theme'; import { Themable, EDITOR_GROUP_HEADER_TABS_BORDER, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND } from 'vs/workbench/common/theme';
import { IMoveEditorOptions } from 'vs/workbench/services/editor/common/nextEditorGroupsService'; import { IMoveEditorOptions } from 'vs/workbench/services/editor/common/nextEditorGroupsService';
import { NextTabsTitleControl } from 'vs/workbench/browser/parts/editor2/nextTabsTitleControl'; import { NextTabsTitleControl } from 'vs/workbench/browser/parts/editor2/nextTabsTitleControl';
import { NextEditorControl } from 'vs/workbench/browser/parts/editor2/nextEditorControl'; import { NextEditorControl } from 'vs/workbench/browser/parts/editor2/nextEditorControl';
...@@ -38,6 +38,8 @@ import { EventType as TouchEventType, GestureEvent } from 'vs/base/browser/touch ...@@ -38,6 +38,8 @@ import { EventType as TouchEventType, GestureEvent } from 'vs/base/browser/touch
import { NextTitleControl } from 'vs/workbench/browser/parts/editor2/nextTitleControl'; import { NextTitleControl } from 'vs/workbench/browser/parts/editor2/nextTitleControl';
import { INextEditorGroupsAccessor, INextEditorGroupView, INextEditorPartOptionsChangeEvent } from 'vs/workbench/browser/parts/editor2/editor2'; import { INextEditorGroupsAccessor, INextEditorGroupView, INextEditorPartOptionsChangeEvent } from 'vs/workbench/browser/parts/editor2/editor2';
import { NextNoTabsTitleControl } from './nextNoTabsTitleControl'; import { NextNoTabsTitleControl } from './nextNoTabsTitleControl';
import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
import { join } from 'vs/base/common/paths';
export class NextEditorGroupView extends Themable implements INextEditorGroupView { export class NextEditorGroupView extends Themable implements INextEditorGroupView {
...@@ -106,7 +108,8 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie ...@@ -106,7 +108,8 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IPartService private partService: IPartService, @IPartService private partService: IPartService,
@INotificationService private notificationService: INotificationService, @INotificationService private notificationService: INotificationService,
@ITelemetryService private telemetryService: ITelemetryService @ITelemetryService private telemetryService: ITelemetryService,
@IUntitledEditorService private untitledEditorService: IUntitledEditorService
) { ) {
super(themeService); super(themeService);
...@@ -284,6 +287,15 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie ...@@ -284,6 +287,15 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie
// Container // Container
addClasses(this.element, 'editor-group-container'); addClasses(this.element, 'editor-group-container');
// Open new file via doubleclick on container
this._register(addDisposableListener(this.element, EventType.DBLCLICK, e => {
if (e.target === this.element) {
EventHelper.stop(e);
this.openEditor(this.untitledEditorService.createOrGet(), EditorOptions.create({ pinned: true }));
}
}));
// Title container // Title container
this.titleContainer = document.createElement('div'); this.titleContainer = document.createElement('div');
addClass(this.titleContainer, 'title'); addClass(this.titleContainer, 'title');
...@@ -803,7 +815,6 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie ...@@ -803,7 +815,6 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie
protected updateStyles(): void { protected updateStyles(): void {
// Container // Container
this.element.style.backgroundColor = this.getColor(EDITOR_GROUP_BACKGROUND);
this.element.style.outlineColor = this.getColor(focusBorder); this.element.style.outlineColor = this.getColor(focusBorder);
// Title control // Title control
...@@ -868,4 +879,15 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie ...@@ -868,4 +879,15 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie
super.dispose(); super.dispose();
} }
} }
\ No newline at end of file
registerThemingParticipant((theme, collector, environment) => {
// Letterpress
const letterpress = `resources/letterpress${theme.type === 'dark' ? '-dark' : theme.type === 'hc' ? '-hc' : ''}.svg`;
collector.addRule(`
.monaco-workbench > .part.editor > .content .editor-group-container.empty {
background-image: url('${join(environment.appRoot, letterpress)}')
}
`);
});
\ No newline at end of file
...@@ -5,25 +5,24 @@ ...@@ -5,25 +5,24 @@
'use strict'; 'use strict';
import 'vs/css!./media/nextEditorpart';
import 'vs/workbench/browser/parts/editor/editor.contribution'; import 'vs/workbench/browser/parts/editor/editor.contribution';
import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { Part } from 'vs/workbench/browser/part'; import { Part } from 'vs/workbench/browser/part';
import { Dimension, addClass, isAncestor } from 'vs/base/browser/dom'; import { Dimension, isAncestor, toggleClass, addClass } from 'vs/base/browser/dom';
import { Event, Emitter, once } from 'vs/base/common/event'; import { Event, Emitter, once } from 'vs/base/common/event';
import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { contrastBorder, editorBackground } from 'vs/platform/theme/common/colorRegistry';
import { INextEditorGroupsService, Direction, CopyKind } from 'vs/workbench/services/editor/common/nextEditorGroupsService'; import { INextEditorGroupsService, Direction, CopyKind } from 'vs/workbench/services/editor/common/nextEditorGroupsService';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { Grid, Direction as GridViewDirection } from 'vs/base/browser/ui/grid/grid'; import { Grid, Direction as GridViewDirection } from 'vs/base/browser/ui/grid/grid';
import { GroupIdentifier, EditorOptions, TextEditorOptions, IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor'; import { GroupIdentifier, EditorOptions, TextEditorOptions, IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor';
import { values } from 'vs/base/common/map'; import { values } from 'vs/base/common/map';
import { EDITOR_GROUP_BORDER, EDITOR_GROUP_BACKGROUND } from 'vs/workbench/common/theme'; import { EDITOR_GROUP_BORDER } from 'vs/workbench/common/theme';
import { distinct } from 'vs/base/common/arrays'; import { distinct } from 'vs/base/common/arrays';
import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService';
import { INextEditorGroupsAccessor, INextEditorGroupView, INextEditorPartOptions, getEditorPartOptions, impactsEditorPartOptions, INextEditorPartOptionsChangeEvent } from 'vs/workbench/browser/parts/editor2/editor2'; import { INextEditorGroupsAccessor, INextEditorGroupView, INextEditorPartOptions, getEditorPartOptions, impactsEditorPartOptions, INextEditorPartOptionsChangeEvent } from 'vs/workbench/browser/parts/editor2/editor2';
import { NextEditorGroupView } from 'vs/workbench/browser/parts/editor2/nextEditorGroupView'; import { NextEditorGroupView } from 'vs/workbench/browser/parts/editor2/nextEditorGroupView';
import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
import { IDisposable } from 'vs/base/common/lifecycle'; import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { assign } from 'vs/base/common/objects'; import { assign } from 'vs/base/common/objects';
// TODO@grid provide DND support of groups/editors: // TODO@grid provide DND support of groups/editors:
...@@ -192,6 +191,9 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN ...@@ -192,6 +191,9 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN
newGroupView.openEditor(activeEditor, options); newGroupView.openEditor(activeEditor, options);
} }
// Update container
this.updateContainer();
return newGroupView; return newGroupView;
} }
...@@ -222,6 +224,9 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN ...@@ -222,6 +224,9 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN
// Remove from grid widget & dispose // Remove from grid widget & dispose
this.gridWidget.removeView(groupView); this.gridWidget.removeView(groupView);
groupView.dispose(); groupView.dispose();
// Update container
this.updateContainer();
} }
private toGridViewDirection(direction: Direction): GridViewDirection { private toGridViewDirection(direction: Direction): GridViewDirection {
...@@ -253,6 +258,13 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN ...@@ -253,6 +258,13 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN
// Set group active // Set group active
this.doSetGroupActive(initialGroup); this.doSetGroupActive(initialGroup);
// Update container
this.updateContainer();
}
private updateContainer(): void {
toggleClass(this.gridContainer, 'empty', this.groupViews.size === 1 && this.activeGroup.isEmpty());
} }
private doSetGroupActive(group: INextEditorGroupView): void { private doSetGroupActive(group: INextEditorGroupView): void {
...@@ -308,13 +320,19 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN ...@@ -308,13 +320,19 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN
this.groupViews.set(groupView.id, groupView); this.groupViews.set(groupView.id, groupView);
// Track focus // Track focus
const focusListener = groupView.onDidFocus(() => { let groupDisposables: IDisposable[] = [];
groupDisposables.push(groupView.onDidFocus(() => {
this.doSetGroupActive(groupView); this.doSetGroupActive(groupView);
}); }));
// Track editor change
groupDisposables.push(groupView.onDidActiveEditorChange(() => {
this.updateContainer();
}));
// Track dispose // Track dispose
once(groupView.onWillDispose)(() => { once(groupView.onWillDispose)(() => {
focusListener.dispose(); groupDisposables = dispose(groupDisposables);
this.groupViews.delete(groupView.id); this.groupViews.delete(groupView.id);
this.doUpdateMostRecentActive(groupView); this.doUpdateMostRecentActive(groupView);
}); });
...@@ -335,7 +353,7 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN ...@@ -335,7 +353,7 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN
// Part container // Part container
const container = this.getContainer(); const container = this.getContainer();
container.style.backgroundColor = this.getColor(EDITOR_GROUP_BACKGROUND); container.style.backgroundColor = this.getColor(editorBackground);
} }
createContentArea(parent: HTMLElement): HTMLElement { createContentArea(parent: HTMLElement): HTMLElement {
......
...@@ -3,15 +3,19 @@ ...@@ -3,15 +3,19 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
.monaco-workbench .part.editor.empty.has-watermark { .monaco-workbench .part.editor.has-watermark > .content.empty .editor-group-container {
background-position-y: calc(50% - 100px); background-position-y: calc(50% - 100px);
} }
.monaco-workbench .part.editor.max-height-478px > .content.empty .editor-group-container {
background-position-y: 50%;
}
.monaco-workbench > .part.editor > .content > .watermark { .monaco-workbench > .part.editor > .content > .watermark {
display: none; /* only visible when no editors are opened */ display: none; /* only visible when no editors are opened */
} }
.monaco-workbench > .part.editor.empty.has-watermark > .content > .watermark { .monaco-workbench > .part.editor.has-watermark > .content.empty > .watermark {
display: block; display: block;
position: absolute; position: absolute;
width: 100%; width: 100%;
...@@ -21,72 +25,69 @@ ...@@ -21,72 +25,69 @@
overflow: hidden; overflow: hidden;
} }
.monaco-workbench > .part.editor.empty > .content > .watermark > .watermark-box { .monaco-workbench > .part.editor > .content.empty > .watermark > .watermark-box {
display: inline-table; display: inline-table;
border-collapse: separate; border-collapse: separate;
border-spacing: 13px 17px; border-spacing: 13px 17px;
} }
.monaco-workbench > .part.editor.empty.max-height-478px > .content > .watermark { .monaco-workbench > .part.editor.max-height-478px > .content.empty > .watermark {
display: none; display: none;
} }
.monaco-workbench .part.editor.empty.max-height-478px {
background-position-y: 50%;
}
.monaco-workbench > .part.editor.empty > .content > .watermark dl { .monaco-workbench > .part.editor > .content.empty > .watermark dl {
display: table-row; display: table-row;
opacity: .8; opacity: .8;
cursor: default; cursor: default;
} }
.monaco-workbench > .part.editor.empty > .content > .watermark dt { .monaco-workbench > .part.editor > .content.empty > .watermark dt {
text-align: right; text-align: right;
letter-spacing: 0.04em letter-spacing: 0.04em
} }
.monaco-workbench > .part.editor.empty > .content > .watermark dd { .monaco-workbench > .part.editor > .content.empty > .watermark dd {
text-align: left; text-align: left;
} }
.monaco-workbench > .part.editor.empty > .content > .watermark dd > .shortcuts { .monaco-workbench > .part.editor > .content.empty > .watermark dd > .shortcuts {
padding-left: 0.5em; padding-left: 0.5em;
padding-right: 0.5em; padding-right: 0.5em;
} }
.monaco-workbench.mac > .part.editor.empty > .content > .watermark dd > .shortcuts { .monaco-workbench.mac > .part.editor > .content.empty > .watermark dd > .shortcuts {
letter-spacing: 0.15em; letter-spacing: 0.15em;
font-family: "Lucida Grande", sans-serif; font-family: "Lucida Grande", sans-serif;
} }
.monaco-workbench > .part.editor.empty > .content > .watermark dd > .unbound { .monaco-workbench > .part.editor > .content.empty > .watermark dd > .unbound {
padding-left: 0.5em; padding-left: 0.5em;
padding-right: 0.5em; padding-right: 0.5em;
} }
.monaco-workbench.mac > .part.editor.empty > .content > .watermark dd > .unbound { .monaco-workbench.mac > .part.editor > .content.empty > .watermark dd > .unbound {
font-family: "Lucida Grande", sans-serif; font-family: "Lucida Grande", sans-serif;
} }
.monaco-workbench > .part.editor.empty > .content > .watermark dt, .monaco-workbench > .part.editor > .content.empty > .watermark dt,
.monaco-workbench > .part.editor.empty > .content > .watermark dd { .monaco-workbench > .part.editor > .content.empty > .watermark dd {
display: table-cell; display: table-cell;
} }
.monaco-workbench > .part.editor.empty > .content > .watermark dt, .monaco-workbench > .part.editor > .content.empty > .watermark dt,
.monaco-workbench > .part.editor.empty > .content > .watermark dl { .monaco-workbench > .part.editor > .content.empty > .watermark dl {
color: rgba(0,0,0,.68); color: rgba(0,0,0,.68);
} }
.vs-dark .monaco-workbench > .part.editor.empty > .content > .watermark dt, .vs-dark .monaco-workbench > .part.editor > .content.empty > .watermark dt,
.vs-dark .monaco-workbench > .part.editor.empty > .content > .watermark dl { .vs-dark .monaco-workbench > .part.editor > .content.empty > .watermark dl {
color: rgba(255,255,255,.6); color: rgba(255,255,255,.6);
} }
.hc-black .monaco-workbench > .part.editor.empty > .content > .watermark dt { .hc-black .monaco-workbench > .part.editor > .content.empty > .watermark dt {
color: #FFF; color: #FFF;
} }
.hc-black .monaco-workbench > .part.editor.empty > .content > .watermark dl { .hc-black .monaco-workbench > .part.editor > .content.empty > .watermark dl {
color: #FFF; color: #FFF;
opacity: 1; opacity: 1;
} }
...@@ -30,6 +30,7 @@ import { FileIconThemeStore } from 'vs/workbench/services/themes/electron-browse ...@@ -30,6 +30,7 @@ import { FileIconThemeStore } from 'vs/workbench/services/themes/electron-browse
import { FileIconThemeData } from 'vs/workbench/services/themes/electron-browser/fileIconThemeData'; import { FileIconThemeData } from 'vs/workbench/services/themes/electron-browser/fileIconThemeData';
import { IWindowService } from 'vs/platform/windows/common/windows'; import { IWindowService } from 'vs/platform/windows/common/windows';
import { removeClasses, addClasses } from 'vs/base/browser/dom'; import { removeClasses, addClasses } from 'vs/base/browser/dom';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
// implementation // implementation
...@@ -97,7 +98,9 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { ...@@ -97,7 +98,9 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
@IConfigurationService private configurationService: IConfigurationService, @IConfigurationService private configurationService: IConfigurationService,
@ITelemetryService private telemetryService: ITelemetryService, @ITelemetryService private telemetryService: ITelemetryService,
@IWindowService private windowService: IWindowService, @IWindowService private windowService: IWindowService,
@IInstantiationService private instantiationService: IInstantiationService) { @IInstantiationService private instantiationService: IInstantiationService,
@IEnvironmentService private environmentService: IEnvironmentService
) {
this.container = container; this.container = container;
this.colorThemeStore = new ColorThemeStore(extensionService, ColorThemeData.createLoadedEmptyTheme(DEFAULT_THEME_ID, DEFAULT_THEME_SETTING_VALUE)); this.colorThemeStore = new ColorThemeStore(extensionService, ColorThemeData.createLoadedEmptyTheme(DEFAULT_THEME_ID, DEFAULT_THEME_SETTING_VALUE));
...@@ -306,7 +309,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { ...@@ -306,7 +309,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
} }
} }
}; };
themingRegistry.getThemingParticipants().forEach(p => p(themeData, ruleCollector)); themingRegistry.getThemingParticipants().forEach(p => p(themeData, ruleCollector, this.environmentService));
_applyRules(cssRules.join('\n'), colorThemeRulesClassName); _applyRules(cssRules.join('\n'), colorThemeRulesClassName);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册