@@ -8,7 +8,7 @@ import * as nls from 'vs/nls';
88import { Event , Emitter } from 'vs/base/common/event' ;
99import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry' ;
1010import { attachStyler , IColorMapping } from 'vs/platform/theme/common/styler' ;
11- import { SIDE_BAR_DRAG_AND_DROP_BACKGROUND , SIDE_BAR_SECTION_HEADER_FOREGROUND , SIDE_BAR_SECTION_HEADER_BACKGROUND , SIDE_BAR_SECTION_HEADER_BORDER } from 'vs/workbench/common/theme' ;
11+ import { SIDE_BAR_DRAG_AND_DROP_BACKGROUND , SIDE_BAR_SECTION_HEADER_FOREGROUND , SIDE_BAR_SECTION_HEADER_BACKGROUND , SIDE_BAR_SECTION_HEADER_BORDER , PANEL_BACKGROUND , SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme' ;
1212import { append , $ , trackFocus , toggleClass , EventType , isAncestor , Dimension , addDisposableListener } from 'vs/base/browser/dom' ;
1313import { IDisposable , combinedDisposable , dispose , toDisposable } from 'vs/base/common/lifecycle' ;
1414import { firstIndex } from 'vs/base/common/arrays' ;
@@ -25,7 +25,7 @@ import { PaneView, IPaneViewOptions, IPaneOptions, Pane, DefaultPaneDndControlle
2525import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
2626import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService' ;
2727import { StandardMouseEvent } from 'vs/base/browser/mouseEvent' ;
28- import { Extensions as ViewContainerExtensions , IView , FocusedViewContext , IViewContainersRegistry , IViewDescriptor , ViewContainer , IViewDescriptorService } from 'vs/workbench/common/views' ;
28+ import { Extensions as ViewContainerExtensions , IView , FocusedViewContext , IViewContainersRegistry , IViewDescriptor , ViewContainer , IViewDescriptorService , ViewContainerLocation , IViewPaneContainer } from 'vs/workbench/common/views' ;
2929import { IStorageService , StorageScope } from 'vs/platform/storage/common/storage' ;
3030import { IContextKey , IContextKeyService } from 'vs/platform/contextkey/common/contextkey' ;
3131import { assertIsDefined } from 'vs/base/common/types' ;
@@ -34,7 +34,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
3434import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet' ;
3535import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions' ;
3636import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' ;
37- import { IViewPaneContainer } from 'vs/workbench/common/viewPaneContainer' ;
3837import { Component } from 'vs/workbench/common/component' ;
3938import { MenuId , MenuItemAction } from 'vs/platform/actions/common/actions' ;
4039import { ContextAwareMenuEntryActionViewItem } from 'vs/platform/actions/browser/menuEntryActionViewItem' ;
@@ -92,6 +91,7 @@ export abstract class ViewPane extends Pane implements IView {
9291 @IContextMenuService protected contextMenuService : IContextMenuService ,
9392 @IConfigurationService protected readonly configurationService : IConfigurationService ,
9493 @IContextKeyService contextKeyService : IContextKeyService ,
94+ @IViewDescriptorService private viewDescriptorService : IViewDescriptorService ,
9595 @IInstantiationService protected instantiationService : IInstantiationService ,
9696 ) {
9797 super ( options ) ;
@@ -189,6 +189,14 @@ export abstract class ViewPane extends Pane implements IView {
189189 this . _onDidChangeTitleArea . fire ( ) ;
190190 }
191191
192+ protected getProgressLocation ( ) : string {
193+ return this . viewDescriptorService . getViewContainer ( this . id ) ! . id ;
194+ }
195+
196+ protected getBackgroundColor ( ) : string {
197+ return this . viewDescriptorService . getViewLocation ( this . id ) === ViewContainerLocation . Panel ? PANEL_BACKGROUND : SIDE_BAR_BACKGROUND ;
198+ }
199+
192200 focus ( ) : void {
193201 if ( this . element ) {
194202 this . element . focus ( ) ;
@@ -602,13 +610,14 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
602610
603611 protected onDidAddViews ( added : IAddedViewDescriptorRef [ ] ) : ViewPane [ ] {
604612 const panesToAdd : { pane : ViewPane , size : number , index : number } [ ] = [ ] ;
613+
605614 for ( const { viewDescriptor, collapsed, index, size } of added ) {
606615 const pane = this . createView ( viewDescriptor ,
607616 {
608617 id : viewDescriptor . id ,
609618 title : viewDescriptor . name ,
610619 actionRunner : this . getActionRunner ( ) ,
611- expanded : ! collapsed
620+ expanded : ! collapsed ,
612621 } ) ;
613622
614623 pane . render ( ) ;
0 commit comments