mirror of
https://github.com/Microsoft/vscode
synced 2024-09-15 00:15:06 +00:00
adopt tree/list styler
This commit is contained in:
parent
37d4fa2bd0
commit
edc636dfd5
|
@ -14,7 +14,7 @@ import errors = require('vs/base/common/errors');
|
|||
import { IQuickNavigateConfiguration, IAutoFocus, IEntryRunContext, IModel, Mode } from 'vs/base/parts/quickopen/common/quickOpen';
|
||||
import { Filter, Renderer, DataSource, IModelProvider, AccessibilityProvider } from 'vs/base/parts/quickopen/browser/quickOpenViewer';
|
||||
import { Dimension, Builder, $ } from 'vs/base/browser/builder';
|
||||
import { ISelectionEvent, IFocusEvent, ITree, ContextMenuEvent, IActionProvider } from 'vs/base/parts/tree/browser/tree';
|
||||
import { ISelectionEvent, IFocusEvent, ITree, ContextMenuEvent, IActionProvider, ITreeStyles } from 'vs/base/parts/tree/browser/tree';
|
||||
import { InputBox, MessageType, IInputBoxStyles } from 'vs/base/browser/ui/inputbox/inputBox';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { Tree } from 'vs/base/parts/tree/browser/treeImpl';
|
||||
|
@ -46,7 +46,7 @@ export interface IQuickOpenOptions extends IQuickOpenStyles {
|
|||
keyboardSupport?: boolean;
|
||||
}
|
||||
|
||||
export interface IQuickOpenStyles extends IInputBoxStyles {
|
||||
export interface IQuickOpenStyles extends IInputBoxStyles, ITreeStyles {
|
||||
background?: Color;
|
||||
foreground?: Color;
|
||||
borderColor?: Color;
|
||||
|
@ -343,6 +343,10 @@ export class QuickOpenWidget implements IModelProvider {
|
|||
inputBorder: this.styles.inputBorder
|
||||
});
|
||||
}
|
||||
|
||||
if (this.tree) {
|
||||
this.tree.style(this.styles);
|
||||
}
|
||||
}
|
||||
|
||||
private shouldOpenInBackground(e: StandardKeyboardEvent): boolean {
|
||||
|
|
|
@ -207,10 +207,4 @@
|
|||
|
||||
.vs-dark .quick-open-widget .quick-open-tree .monaco-highlighted-label .highlight {
|
||||
color: #0097FB;
|
||||
}
|
||||
|
||||
.quick-open-widget .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected,
|
||||
.quick-open-widget .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.focused {
|
||||
background: #DCEBFC;
|
||||
color: inherit;
|
||||
}
|
|
@ -40,6 +40,7 @@ import { FileReferences, OneReference, ReferencesModel } from './referencesModel
|
|||
import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService';
|
||||
import { registerColor, highContrastOutline } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { registerThemingParticipant, ITheme, IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
|
||||
class DecorationsManager implements IDisposable {
|
||||
|
||||
|
@ -614,6 +615,7 @@ export class ReferenceWidget extends PeekViewWidget {
|
|||
ariaLabel: nls.localize('treeAriaLabel', "References")
|
||||
};
|
||||
this._tree = new Tree(div.getHTMLElement(), config, options);
|
||||
this._callOnDispose.push(attachListStyler(this._tree, this._themeService));
|
||||
|
||||
this._treeContainer = div.hide();
|
||||
});
|
||||
|
|
|
@ -27,6 +27,8 @@ import { Context as SuggestContext } from './suggest';
|
|||
import { ICompletionItem, CompletionModel } from './completionModel';
|
||||
import { alert } from 'vs/base/browser/ui/aria/aria';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
import { IThemeService } from "vs/platform/theme/common/themeService";
|
||||
|
||||
const sticky = false; // for development purposes
|
||||
|
||||
|
@ -350,7 +352,8 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
|
|||
private editor: ICodeEditor,
|
||||
@ITelemetryService private telemetryService: ITelemetryService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IInstantiationService instantiationService: IInstantiationService
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService
|
||||
) {
|
||||
this.isAuto = false;
|
||||
this.focusedItem = null;
|
||||
|
@ -373,6 +376,7 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
|
|||
});
|
||||
|
||||
this.toDispose = [
|
||||
attachListStyler(this.list, themeService),
|
||||
editor.onDidBlurEditorText(() => this.onEditorBlur()),
|
||||
this.list.onSelectionChange(e => this.onListSelection(e)),
|
||||
this.list.onFocusChange(e => this.onListFocus(e)),
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
'use strict';
|
||||
|
||||
import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, highContrastBorder, inputActiveOptionBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, highContrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listFocusAndSelectionBackground, listFocusAndSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, highContrastOutline } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { IDisposable } from "vs/base/common/lifecycle";
|
||||
|
||||
export interface IThemable {
|
||||
|
@ -59,13 +59,62 @@ export function attachFindInputBoxStyler(widget: IThemable, themeService: ITheme
|
|||
});
|
||||
}
|
||||
|
||||
export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeService, style?: { foreground?: ColorIdentifier, background?: ColorIdentifier, borderColor?: ColorIdentifier, inputBackground?: ColorIdentifier, inputForeground?: ColorIdentifier, inputBorder?: ColorIdentifier }): IDisposable {
|
||||
export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeService, style?: {
|
||||
foreground?: ColorIdentifier,
|
||||
background?: ColorIdentifier,
|
||||
borderColor?: ColorIdentifier,
|
||||
inputBackground?: ColorIdentifier,
|
||||
inputForeground?: ColorIdentifier,
|
||||
inputBorder?: ColorIdentifier,
|
||||
listFocusBackground?: ColorIdentifier,
|
||||
listActiveSelectionBackground?: ColorIdentifier,
|
||||
listActiveSelectionForeground?: ColorIdentifier,
|
||||
listFocusAndSelectionBackground?: ColorIdentifier,
|
||||
listFocusAndSelectionForeground?: ColorIdentifier,
|
||||
listInactiveSelectionBackground?: ColorIdentifier,
|
||||
listHoverBackground?: ColorIdentifier,
|
||||
listDropBackground?: ColorIdentifier,
|
||||
listFocusOutline?: ColorIdentifier
|
||||
}): IDisposable {
|
||||
return attachStyler(themeService, widget, {
|
||||
foreground: (style && style.foreground) || foreground,
|
||||
background: (style && style.background) || editorBackground,
|
||||
borderColor: style && style.borderColor || highContrastBorder,
|
||||
inputBackground: (style && style.inputBackground) || inputBackground,
|
||||
inputForeground: (style && style.inputForeground) || inputForeground,
|
||||
inputBorder: (style && style.inputBorder) || inputBorder
|
||||
inputBorder: (style && style.inputBorder) || inputBorder,
|
||||
listFocusBackground: (style && style.listFocusBackground) || listFocusBackground,
|
||||
listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground,
|
||||
listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground,
|
||||
listFocusAndSelectionBackground: (style && style.listFocusAndSelectionBackground) || listFocusAndSelectionBackground,
|
||||
listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listFocusAndSelectionForeground,
|
||||
listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground,
|
||||
listHoverBackground: (style && style.listHoverBackground) || listHoverBackground,
|
||||
listDropBackground: (style && style.listDropBackground) || listDropBackground,
|
||||
listFocusOutline: (style && style.listFocusOutline) || highContrastOutline
|
||||
});
|
||||
}
|
||||
|
||||
export function attachListStyler(widget: IThemable, themeService: IThemeService, style?: {
|
||||
listFocusBackground?: ColorIdentifier,
|
||||
listActiveSelectionBackground?: ColorIdentifier,
|
||||
listActiveSelectionForeground?: ColorIdentifier,
|
||||
listFocusAndSelectionBackground?: ColorIdentifier,
|
||||
listFocusAndSelectionForeground?: ColorIdentifier,
|
||||
listInactiveSelectionBackground?: ColorIdentifier,
|
||||
listHoverBackground?: ColorIdentifier,
|
||||
listDropBackground?: ColorIdentifier,
|
||||
listFocusOutline?: ColorIdentifier
|
||||
}): IDisposable {
|
||||
return attachStyler(themeService, widget, {
|
||||
listFocusBackground: (style && style.listFocusBackground) || listFocusBackground,
|
||||
listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground,
|
||||
listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground,
|
||||
listFocusAndSelectionBackground: (style && style.listFocusAndSelectionBackground) || listFocusAndSelectionBackground,
|
||||
listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listFocusAndSelectionForeground,
|
||||
listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground,
|
||||
listHoverBackground: (style && style.listHoverBackground) || listHoverBackground,
|
||||
listDropBackground: (style && style.listDropBackground) || listDropBackground,
|
||||
listFocusOutline: (style && style.listFocusOutline) || highContrastOutline
|
||||
});
|
||||
}
|
|
@ -35,6 +35,7 @@ import { BreakpointWidget } from 'vs/workbench/parts/debug/browser/breakpointWid
|
|||
import { ExceptionWidget } from 'vs/workbench/parts/debug/browser/exceptionWidget';
|
||||
import { FloatingClickWidget } from 'vs/workbench/parts/preferences/browser/preferencesWidgets';
|
||||
import { IListService } from 'vs/platform/list/browser/listService';
|
||||
import { IThemeService } from "vs/platform/theme/common/themeService";
|
||||
|
||||
const HOVER_DELAY = 300;
|
||||
const LAUNCH_JSON_REGEX = /launch\.json$/;
|
||||
|
@ -73,10 +74,11 @@ export class DebugEditorContribution implements IDebugEditorContribution {
|
|||
@ICodeEditorService private codeEditorService: ICodeEditorService,
|
||||
@ITelemetryService private telemetryService: ITelemetryService,
|
||||
@IListService listService: IListService,
|
||||
@IConfigurationService private configurationService: IConfigurationService
|
||||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@IThemeService themeService: IThemeService
|
||||
) {
|
||||
this.breakpointHintDecoration = [];
|
||||
this.hoverWidget = new DebugHoverWidget(this.editor, this.debugService, listService, this.instantiationService);
|
||||
this.hoverWidget = new DebugHoverWidget(this.editor, this.debugService, listService, this.instantiationService, themeService);
|
||||
this.toDispose = [];
|
||||
this.showHoverScheduler = new RunOnceScheduler(() => this.showHover(this.hoverRange, false), HOVER_DELAY);
|
||||
this.hideHoverScheduler = new RunOnceScheduler(() => this.hoverWidget.hide(), HOVER_DELAY);
|
||||
|
|
|
@ -21,6 +21,8 @@ import { IDebugService, IExpression, IExpressionContainer } from 'vs/workbench/p
|
|||
import { Expression } from 'vs/workbench/parts/debug/common/debugModel';
|
||||
import { VariablesRenderer, renderExpressionValue, VariablesDataSource } from 'vs/workbench/parts/debug/electron-browser/debugViewer';
|
||||
import { IListService } from 'vs/platform/list/browser/listService';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
import { IThemeService } from "vs/platform/theme/common/themeService";
|
||||
|
||||
const $ = dom.$;
|
||||
const MAX_ELEMENTS_SHOWN = 18;
|
||||
|
@ -48,7 +50,8 @@ export class DebugHoverWidget implements IContentWidget {
|
|||
private editor: ICodeEditor,
|
||||
private debugService: IDebugService,
|
||||
private listService: IListService,
|
||||
instantiationService: IInstantiationService
|
||||
instantiationService: IInstantiationService,
|
||||
private themeService: IThemeService
|
||||
) {
|
||||
this.toDispose = [];
|
||||
this.create(instantiationService);
|
||||
|
@ -83,6 +86,7 @@ export class DebugHoverWidget implements IContentWidget {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
this.toDispose.push(attachListStyler(this.tree, this.themeService));
|
||||
this.toDispose.push(this.listService.register(this.tree));
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ import { IMessageService } from 'vs/platform/message/common/message';
|
|||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IListService } from 'vs/platform/list/browser/listService';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
import { IThemeService } from "vs/platform/theme/common/themeService";
|
||||
|
||||
function renderViewTree(container: HTMLElement): HTMLElement {
|
||||
const treeContainer = document.createElement('div');
|
||||
|
@ -56,7 +58,8 @@ export class VariablesView extends CollapsibleViewletView {
|
|||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IListService private listService: IListService
|
||||
@IListService private listService: IListService,
|
||||
@IThemeService private themeService: IThemeService
|
||||
) {
|
||||
super(actionRunner, !!settings[VariablesView.MEMENTO], nls.localize('variablesSection', "Variables Section"), messageService, keybindingService, contextMenuService);
|
||||
|
||||
|
@ -102,6 +105,7 @@ export class VariablesView extends CollapsibleViewletView {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
this.toDispose.push(attachListStyler(this.tree, this.themeService));
|
||||
this.toDispose.push(this.listService.register(this.tree, [this.variablesFocusedContext]));
|
||||
|
||||
const viewModel = this.debugService.getViewModel();
|
||||
|
@ -162,7 +166,8 @@ export class WatchExpressionsView extends CollapsibleViewletView {
|
|||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IListService private listService: IListService
|
||||
@IListService private listService: IListService,
|
||||
@IThemeService private themeService: IThemeService
|
||||
) {
|
||||
super(actionRunner, !!settings[WatchExpressionsView.MEMENTO], nls.localize('expressionsSection', "Expressions Section"), messageService, keybindingService, contextMenuService);
|
||||
|
||||
|
@ -205,6 +210,7 @@ export class WatchExpressionsView extends CollapsibleViewletView {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
this.toDispose.push(attachListStyler(this.tree, this.themeService));
|
||||
this.toDispose.push(this.listService.register(this.tree, [this.watchExpressionsFocusedContext]));
|
||||
|
||||
this.tree.setInput(this.debugService.getModel());
|
||||
|
@ -259,7 +265,8 @@ export class CallStackView extends CollapsibleViewletView {
|
|||
@IDebugService private debugService: IDebugService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@IListService private listService: IListService
|
||||
@IListService private listService: IListService,
|
||||
@IThemeService private themeService: IThemeService
|
||||
) {
|
||||
super(actionRunner, !!settings[CallStackView.MEMENTO], nls.localize('callstackSection', "Call Stack Section"), messageService, keybindingService, contextMenuService);
|
||||
|
||||
|
@ -318,6 +325,7 @@ export class CallStackView extends CollapsibleViewletView {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
this.toDispose.push(attachListStyler(this.tree, this.themeService));
|
||||
this.toDispose.push(this.listService.register(this.tree));
|
||||
|
||||
this.toDispose.push(this.tree.addListener2('selection', event => {
|
||||
|
@ -390,7 +398,8 @@ export class BreakpointsView extends AdaptiveCollapsibleViewletView {
|
|||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IListService private listService: IListService
|
||||
@IListService private listService: IListService,
|
||||
@IThemeService private themeService: IThemeService
|
||||
) {
|
||||
super(actionRunner, BreakpointsView.getExpandedBodySize(
|
||||
debugService.getModel().getBreakpoints().length + debugService.getModel().getFunctionBreakpoints().length + debugService.getModel().getExceptionBreakpoints().length),
|
||||
|
@ -448,6 +457,7 @@ export class BreakpointsView extends AdaptiveCollapsibleViewletView {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
this.toDispose.push(attachListStyler(this.tree, this.themeService));
|
||||
this.toDispose.push(this.listService.register(this.tree, [this.breakpointsFocusedContext]));
|
||||
|
||||
this.toDispose.push(this.tree.addListener2('selection', event => {
|
||||
|
|
|
@ -40,6 +40,7 @@ import { Panel } from 'vs/workbench/browser/panel';
|
|||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
|
||||
import { IListService } from 'vs/platform/list/browser/listService';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
|
@ -150,6 +151,7 @@ export class Repl extends Panel implements IPrivateReplService {
|
|||
controller
|
||||
}, replTreeOptions);
|
||||
|
||||
this.toDispose.push(attachListStyler(this.tree, this.themeService));
|
||||
this.toDispose.push(this.listService.register(this.tree));
|
||||
|
||||
if (!Repl.HISTORY) {
|
||||
|
|
|
@ -21,6 +21,8 @@ import { ITree } from 'vs/base/parts/tree/browser/tree';
|
|||
import { Tree } from 'vs/base/parts/tree/browser/treeImpl';
|
||||
import { TreeExplorerViewletState, TreeDataSource, TreeRenderer, TreeController } from 'vs/workbench/parts/explorers/browser/views/treeExplorerViewer';
|
||||
import { RefreshViewExplorerAction } from 'vs/workbench/parts/explorers/browser/treeExplorerActions';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
import { IThemeService } from "vs/platform/theme/common/themeService";
|
||||
|
||||
export class TreeExplorerView extends CollapsibleViewletView {
|
||||
constructor(
|
||||
|
@ -34,7 +36,8 @@ export class TreeExplorerView extends CollapsibleViewletView {
|
|||
@IWorkspaceContextService contextService: IWorkspaceContextService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@ITreeExplorerService private treeExplorerService: ITreeExplorerService,
|
||||
@IListService private listService: IListService
|
||||
@IListService private listService: IListService,
|
||||
@IThemeService private themeService: IThemeService
|
||||
) {
|
||||
super(actionRunner, false, nls.localize('treeExplorerViewlet.tree', "Tree Explorer Section"), messageService, keybindingService, contextMenuService, headerSize);
|
||||
|
||||
|
@ -61,6 +64,7 @@ export class TreeExplorerView extends CollapsibleViewletView {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
this.toDispose.push(attachListStyler(tree, this.themeService));
|
||||
this.toDispose.push(this.listService.register(tree));
|
||||
|
||||
return tree;
|
||||
|
|
|
@ -48,6 +48,7 @@ import { IListService } from 'vs/platform/list/browser/listService';
|
|||
import { IPartService, Parts } from 'vs/workbench/services/part/common/partService';
|
||||
import { IThemeService } from "vs/platform/theme/common/themeService";
|
||||
import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
|
||||
function renderBody(body: string): string {
|
||||
const nonce = new Date().getTime() + '' + new Date().getMilliseconds();
|
||||
|
@ -428,6 +429,9 @@ export class ExtensionEditor extends BaseEditor {
|
|||
twistiePixels: 20,
|
||||
keyboardSupport: false
|
||||
});
|
||||
|
||||
this.contentDisposables.push(attachListStyler(tree, this.themeService));
|
||||
|
||||
tree.setInput(extensionDependencies);
|
||||
|
||||
this.contentDisposables.push(tree.addListener2('selection', event => {
|
||||
|
|
|
@ -51,6 +51,7 @@ import { IExtensionService } from 'vs/platform/extensions/common/extensions';
|
|||
import { IModeService } from 'vs/editor/common/services/modeService';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { inputForeground, inputBackground, highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
|
||||
interface SearchInputEvent extends Event {
|
||||
target: HTMLInputElement;
|
||||
|
@ -115,6 +116,7 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
this.disposables.push(attachListStyler(this.list.widget, this.themeService));
|
||||
this.disposables.push(this.listService.register(this.list.widget));
|
||||
|
||||
const onKeyDown = chain(domEvent(this.searchBox, 'keydown'))
|
||||
|
|
|
@ -42,6 +42,7 @@ import { ResourceContextKey } from 'vs/workbench/common/resourceContextKey';
|
|||
import { IWorkbenchThemeService, IFileIconTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { isLinux } from 'vs/base/common/platform';
|
||||
import { IEnvironmentService } from "vs/platform/environment/common/environment";
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
|
||||
export class ExplorerView extends CollapsibleViewletView {
|
||||
|
||||
|
@ -357,6 +358,9 @@ export class ExplorerView extends CollapsibleViewletView {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
// Theme styler
|
||||
this.toDispose.push(attachListStyler(this.explorerViewer, this.themeService));
|
||||
|
||||
// Register to list service
|
||||
this.toDispose.push(this.listService.register(this.explorerViewer, [this.explorerFocussedContext, this.filesExplorerFocussedContext]));
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ import { ToggleEditorLayoutAction } from 'vs/workbench/browser/actions/toggleEdi
|
|||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IListService } from 'vs/platform/list/browser/listService';
|
||||
import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
import { IThemeService } from "vs/platform/theme/common/themeService";
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
|
@ -64,7 +66,8 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView {
|
|||
@IListService private listService: IListService,
|
||||
@IUntitledEditorService private untitledEditorService: IUntitledEditorService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IViewletService private viewletService: IViewletService
|
||||
@IViewletService private viewletService: IViewletService,
|
||||
@IThemeService private themeService: IThemeService
|
||||
) {
|
||||
super(actionRunner, OpenEditorsView.computeExpandedBodySize(editorGroupService.getStacksModel()), !!settings[OpenEditorsView.MEMENTO_COLLAPSED], nls.localize({ key: 'openEditosrSection', comment: ['Open is an adjective'] }, "Open Editors Section"), keybindingService, contextMenuService);
|
||||
|
||||
|
@ -123,6 +126,9 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
// Theme styler
|
||||
this.toDispose.push(attachListStyler(this.tree, this.themeService));
|
||||
|
||||
// Register to list service
|
||||
this.toDispose.push(this.listService.register(this.tree, [this.explorerFocussedContext, this.openEditorsFocussedContext]));
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c
|
|||
import { IChoiceService, IMessageService, Severity } from 'vs/platform/message/common/message';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
|
||||
let $ = DOM.$;
|
||||
|
||||
|
@ -331,6 +332,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
|
|||
this.keybindingFocusContextKey.reset();
|
||||
}));
|
||||
|
||||
this._register(attachListStyler(this.keybindingsList, this.themeService));
|
||||
this._register(this.listService.register(this.keybindingsList));
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox';
|
|||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { comparePaths } from 'vs/base/common/comparers';
|
||||
import { isSCMResource } from './scmUtil';
|
||||
import { attachInputBoxStyler } from 'vs/platform/theme/common/styler';
|
||||
import { attachInputBoxStyler, attachListStyler } from 'vs/platform/theme/common/styler';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
|
||||
// TODO@Joao
|
||||
|
@ -302,6 +302,7 @@ export class SCMViewlet extends Viewlet {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
this.disposables.push(attachListStyler(this.list, this.themeService));
|
||||
this.disposables.push(this.listService.register(this.list));
|
||||
|
||||
chain(this.list.onOpen)
|
||||
|
|
|
@ -61,6 +61,7 @@ import { IListService } from 'vs/platform/list/browser/listService';
|
|||
import { IThemeService, ITheme, ICssStyleCollector, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
|
||||
import { editorFindMatchHighlight } from 'vs/platform/theme/common/colorRegistry';
|
||||
import FileResultsNavigation from 'vs/workbench/browser/fileResultsNavigation';
|
||||
import { attachListStyler } from "vs/platform/theme/common/styler";
|
||||
|
||||
export class SearchViewlet extends Viewlet {
|
||||
|
||||
|
@ -476,6 +477,8 @@ export class SearchViewlet extends Viewlet {
|
|||
keyboardSupport: false
|
||||
});
|
||||
|
||||
this.toDispose.push(attachListStyler(this.tree, this.themeService));
|
||||
|
||||
this.tree.setInput(this.viewModel.searchResult);
|
||||
this.toUnbind.push(renderer);
|
||||
|
||||
|
|
Loading…
Reference in a new issue