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

theming - panel border top

上级 acfe8468
......@@ -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
* method. Calling it otherwise may result in unexpected behavior.
......@@ -52,6 +56,8 @@ export abstract class Part extends Component {
this.contentArea = this.createContentArea(parent);
this.partLayout = new PartLayout(this.parent, this.options, this.titleArea, this.contentArea);
this.updateStyles();
}
/**
......@@ -68,6 +74,13 @@ export abstract class Part extends Component {
return null;
}
/**
* Returns the title area container.
*/
protected getTitleArea(): Builder {
return this.titleArea;
}
/**
* Subclasses override to provide a content area implementation.
*/
......
......@@ -901,8 +901,6 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
.div()
.addClass('content');
this.updateStyles();
// get settings
this.memento = this.getMemento(this.storageService, MementoScope.WORKSPACE);
......
......@@ -93,16 +93,7 @@
background: url('close-inverse.svg') center center no-repeat;
}
/** TODO@theme */
.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;
}
/** TODO@theme (widgets) */
.vs .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label {
color: rgba(66, 66, 66, 0.75);
......
......@@ -25,7 +25,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
import { ClosePanelAction, PanelAction, ToggleMaximizedPanelAction } from 'vs/workbench/browser/parts/panel/panelActions';
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 {
......@@ -95,16 +95,12 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
return this._onDidCompositeClose.event;
}
public createContentArea(parent: Builder): Builder {
const contentArea = super.createContentArea(parent);
this.updateStyles();
return contentArea;
}
protected updateStyles(): void {
const container = this.getContainer();
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> {
......
......@@ -127,8 +127,6 @@ export class StatusbarPart extends Part implements IStatusbarService {
return dispose;
}));
this.updateStyles();
return this.statusItemsContainer;
}
......
......@@ -31,6 +31,12 @@ export const PANEL_BACKGROUND = registerColor('panelBackground', {
hc: editorBackground
}, 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 --- >
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册