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

theming - panel border top

上级 acfe8468
...@@ -40,6 +40,10 @@ export abstract class Part extends Component { ...@@ -40,6 +40,10 @@ export abstract class Part extends Component {
} }
} }
protected updateStyles(): void {
// Subclasses to override
}
/** /**
* Note: Clients should not call this method, the workbench calls this * Note: Clients should not call this method, the workbench calls this
* method. Calling it otherwise may result in unexpected behavior. * method. Calling it otherwise may result in unexpected behavior.
...@@ -52,6 +56,8 @@ export abstract class Part extends Component { ...@@ -52,6 +56,8 @@ export abstract class Part extends Component {
this.contentArea = this.createContentArea(parent); this.contentArea = this.createContentArea(parent);
this.partLayout = new PartLayout(this.parent, this.options, this.titleArea, this.contentArea); this.partLayout = new PartLayout(this.parent, this.options, this.titleArea, this.contentArea);
this.updateStyles();
} }
/** /**
...@@ -68,6 +74,13 @@ export abstract class Part extends Component { ...@@ -68,6 +74,13 @@ export abstract class Part extends Component {
return null; return null;
} }
/**
* Returns the title area container.
*/
protected getTitleArea(): Builder {
return this.titleArea;
}
/** /**
* Subclasses override to provide a content area implementation. * Subclasses override to provide a content area implementation.
*/ */
......
...@@ -901,8 +901,6 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService ...@@ -901,8 +901,6 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
.div() .div()
.addClass('content'); .addClass('content');
this.updateStyles();
// get settings // get settings
this.memento = this.getMemento(this.storageService, MementoScope.WORKSPACE); this.memento = this.getMemento(this.storageService, MementoScope.WORKSPACE);
......
...@@ -93,16 +93,7 @@ ...@@ -93,16 +93,7 @@
background: url('close-inverse.svg') center center no-repeat; background: url('close-inverse.svg') center center no-repeat;
} }
/** TODO@theme */ /** TODO@theme (widgets) */
.vs .monaco-workbench > .part.panel .title,
.vs-dark .monaco-workbench > .part.panel .title {
border-top-color: rgba(128, 128, 128, 0.35);
}
.hc-black .monaco-workbench > .part.panel .title {
border-top-color: #6FC3DF;
}
.vs .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label { .vs .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label {
color: rgba(66, 66, 66, 0.75); color: rgba(66, 66, 66, 0.75);
......
...@@ -25,7 +25,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti ...@@ -25,7 +25,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
import { ClosePanelAction, PanelAction, ToggleMaximizedPanelAction } from 'vs/workbench/browser/parts/panel/panelActions'; import { ClosePanelAction, PanelAction, ToggleMaximizedPanelAction } from 'vs/workbench/browser/parts/panel/panelActions';
import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IThemeService } from 'vs/platform/theme/common/themeService';
import { PANEL_BACKGROUND } from 'vs/workbench/common/theme'; import { PANEL_BACKGROUND, PANEL_BORDER_TOP_COLOR } from 'vs/workbench/common/theme';
export class PanelPart extends CompositePart<Panel> implements IPanelService { export class PanelPart extends CompositePart<Panel> implements IPanelService {
...@@ -95,16 +95,12 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService { ...@@ -95,16 +95,12 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
return this._onDidCompositeClose.event; return this._onDidCompositeClose.event;
} }
public createContentArea(parent: Builder): Builder {
const contentArea = super.createContentArea(parent);
this.updateStyles();
return contentArea;
}
protected updateStyles(): void { protected updateStyles(): void {
const container = this.getContainer(); const container = this.getContainer();
container.style('background-color', this.getColor(PANEL_BACKGROUND)); container.style('background-color', this.getColor(PANEL_BACKGROUND));
const title = this.getTitleArea();
title.style('border-top-color', this.getColor(PANEL_BORDER_TOP_COLOR));
} }
public openPanel(id: string, focus?: boolean): TPromise<Panel> { public openPanel(id: string, focus?: boolean): TPromise<Panel> {
......
...@@ -127,8 +127,6 @@ export class StatusbarPart extends Part implements IStatusbarService { ...@@ -127,8 +127,6 @@ export class StatusbarPart extends Part implements IStatusbarService {
return dispose; return dispose;
})); }));
this.updateStyles();
return this.statusItemsContainer; return this.statusItemsContainer;
} }
......
...@@ -31,6 +31,12 @@ export const PANEL_BACKGROUND = registerColor('panelBackground', { ...@@ -31,6 +31,12 @@ export const PANEL_BACKGROUND = registerColor('panelBackground', {
hc: editorBackground hc: editorBackground
}, nls.localize('panelBackground', "Panel background color. Panels are shown below the editor area and contain views like output and integrated terminal.")); }, nls.localize('panelBackground', "Panel background color. Panels are shown below the editor area and contain views like output and integrated terminal."));
export const PANEL_BORDER_TOP_COLOR = registerColor('panelBorderTopColor', {
dark: '#80808059', // rgba(128, 128, 128, 0.35)
light: '#80808059', // rgba(128, 128, 128, 0.35)
hc: '#6FC3DF'
}, nls.localize('panelBorderTopColor', "Panel border color on the top separating to the editor. Panels are shown below the editor area and contain views like output and integrated terminal."));
// < --- Status --- > // < --- Status --- >
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册