diff --git a/src/vs/workbench/browser/parts/views/panelViewlet.ts b/src/vs/workbench/browser/parts/views/panelViewlet.ts index e935a1c68042451601ba6a97d03de9b3f8362c43..e6b6ca730bb4c41020a28330259ba3a78d24833e 100644 --- a/src/vs/workbench/browser/parts/views/panelViewlet.ts +++ b/src/vs/workbench/browser/parts/views/panelViewlet.ts @@ -8,7 +8,7 @@ import * as nls from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter, filterEvent } from 'vs/base/common/event'; import { ColorIdentifier, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { attachStyler, IColorMapping, IThemable } from 'vs/platform/theme/common/styler'; +import { attachStyler, IColorMapping } from 'vs/platform/theme/common/styler'; import { SIDE_BAR_DRAG_AND_DROP_BACKGROUND, SIDE_BAR_SECTION_HEADER_FOREGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; import { Dimension, Builder } from 'vs/base/browser/builder'; import { append, $, trackFocus, toggleClass, EventType, isAncestor } from 'vs/base/browser/dom'; @@ -36,15 +36,6 @@ export interface IPanelColors extends IColorMapping { headerHighContrastBorder?: ColorIdentifier; } -export function attachPanelStyler(widget: IThemable, themeService: IThemeService) { - return attachStyler(themeService, { - headerForeground: SIDE_BAR_SECTION_HEADER_FOREGROUND, - headerBackground: SIDE_BAR_SECTION_HEADER_BACKGROUND, - headerHighContrastBorder: contrastBorder, - dropBackground: SIDE_BAR_DRAG_AND_DROP_BACKGROUND - }, widget); -} - export interface IViewletPanelOptions extends IPanelOptions { actionRunner?: IActionRunner; } @@ -262,8 +253,14 @@ export class PanelViewlet extends Viewlet { this.lastFocusedPanel = undefined; } }, null, disposables); - const styler = attachPanelStyler(panel, this.themeService); - const disposable = combinedDisposable([onDidFocus, styler, onDidChange]); + + const panelStyler = attachStyler(this.themeService, { + headerForeground: SIDE_BAR_SECTION_HEADER_FOREGROUND, + headerBackground: SIDE_BAR_SECTION_HEADER_BACKGROUND, + headerHighContrastBorder: index === 0 ? null : contrastBorder, + dropBackground: SIDE_BAR_DRAG_AND_DROP_BACKGROUND + }, panel); + const disposable = combinedDisposable([onDidFocus, panelStyler, onDidChange]); const panelItem: IViewletPanelItem = { panel, disposable }; const wasSingleView = this.isSingleView();