提交 fe646562 编写于 作者: S SteVen Batten

doing the same for outline

上级 d9e4100e
...@@ -807,6 +807,11 @@ export class WorkbenchDataTree<TInput, T, TFilterData = void> extends DataTree<T ...@@ -807,6 +807,11 @@ export class WorkbenchDataTree<TInput, T, TFilterData = void> extends DataTree<T
this.internals = new WorkbenchTreeInternals(this, treeOptions, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService); this.internals = new WorkbenchTreeInternals(this, treeOptions, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService);
this.disposables.add(this.internals); this.disposables.add(this.internals);
} }
updateOptions(options: IWorkbenchAsyncDataTreeOptions<T, TFilterData> = {}): void {
super.updateOptions(options);
this.internals.updateStyleOverrides(options.overrideStyles);
}
} }
export interface IWorkbenchAsyncDataTreeOptions<T, TFilterData> extends IAsyncDataTreeOptions<T, TFilterData> { export interface IWorkbenchAsyncDataTreeOptions<T, TFilterData> extends IAsyncDataTreeOptions<T, TFilterData> {
......
...@@ -91,7 +91,7 @@ export abstract class ViewPane extends Pane implements IView { ...@@ -91,7 +91,7 @@ export abstract class ViewPane extends Pane implements IView {
@IContextMenuService protected contextMenuService: IContextMenuService, @IContextMenuService protected contextMenuService: IContextMenuService,
@IConfigurationService protected readonly configurationService: IConfigurationService, @IConfigurationService protected readonly configurationService: IConfigurationService,
@IContextKeyService contextKeyService: IContextKeyService, @IContextKeyService contextKeyService: IContextKeyService,
@IViewDescriptorService private viewDescriptorService: IViewDescriptorService, @IViewDescriptorService protected viewDescriptorService: IViewDescriptorService,
@IInstantiationService protected instantiationService: IInstantiationService, @IInstantiationService protected instantiationService: IInstantiationService,
) { ) {
super(options); super(options);
......
...@@ -47,7 +47,6 @@ import { basename } from 'vs/base/common/resources'; ...@@ -47,7 +47,6 @@ import { basename } from 'vs/base/common/resources';
import { IDataSource } from 'vs/base/browser/ui/tree/tree'; import { IDataSource } from 'vs/base/browser/ui/tree/tree';
import { IMarkerDecorationsService } from 'vs/editor/common/services/markersDecorationService'; import { IMarkerDecorationsService } from 'vs/editor/common/services/markersDecorationService';
import { MarkerSeverity } from 'vs/platform/markers/common/markers'; import { MarkerSeverity } from 'vs/platform/markers/common/markers';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import { IViewDescriptorService } from 'vs/workbench/common/views'; import { IViewDescriptorService } from 'vs/workbench/common/views';
class RequestState { class RequestState {
...@@ -335,13 +334,19 @@ export class OutlinePane extends ViewPane { ...@@ -335,13 +334,19 @@ export class OutlinePane extends ViewPane {
keyboardNavigationLabelProvider: new OutlineNavigationLabelProvider(), keyboardNavigationLabelProvider: new OutlineNavigationLabelProvider(),
hideTwistiesOfChildlessElements: true, hideTwistiesOfChildlessElements: true,
overrideStyles: { overrideStyles: {
listBackground: SIDE_BAR_BACKGROUND listBackground: this.getBackgroundColor()
} }
} }
); );
this._disposables.push(this._tree); this._disposables.push(this._tree);
this._disposables.push(this._outlineViewState.onDidChange(this._onDidChangeUserState, this)); this._disposables.push(this._outlineViewState.onDidChange(this._onDidChangeUserState, this));
this._disposables.push(this.viewDescriptorService.onDidChangeLocation(({ views, from, to }) => {
if (views.some(v => v.id === this.id)) {
this._tree.updateOptions({ overrideStyles: { listBackground: this.getBackgroundColor() } });
}
}));
// override the globally defined behaviour // override the globally defined behaviour
this._tree.updateOptions({ this._tree.updateOptions({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册