diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index 309cf9711c4..576dc17e381 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -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 { diff --git a/src/vs/base/parts/quickopen/browser/quickopen.css b/src/vs/base/parts/quickopen/browser/quickopen.css index 7bcd41fd3f7..7bb7be3a1ca 100644 --- a/src/vs/base/parts/quickopen/browser/quickopen.css +++ b/src/vs/base/parts/quickopen/browser/quickopen.css @@ -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; } \ No newline at end of file diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index ffff34b874e..360375de98b 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -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(); }); diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index f66398c0807..ce98c94d2d8 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -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 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 }); this.toDispose = [ + attachListStyler(this.list, themeService), editor.onDidBlurEditorText(() => this.onEditorBlur()), this.list.onSelectionChange(e => this.onListSelection(e)), this.list.onFocusChange(e => this.onListFocus(e)), diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index f0b8c55112f..f806786a1ac 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -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 }); } \ No newline at end of file diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index 5c29012d002..3cd28a3b459 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -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); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index e88e4e549f5..31746da99b1 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -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)); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts index e921a194196..260818ed12d 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts @@ -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 => { diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index 6cb4bc8ea7c..3bbffa5fa8e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -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) { diff --git a/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts b/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts index 1fd14221bd2..30d2f9acc3c 100644 --- a/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts +++ b/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts @@ -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; diff --git a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts index 15c667eda4f..edff6605da5 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts @@ -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 => { diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts index 97a881f4467..182d2661713 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts @@ -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')) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 684c966b261..e707043d36f 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -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])); diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index bb5c2b7b9a5..009ead5227e 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -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])); diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index ca8050457ad..8927996776c 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -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)); } diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index 375539eef35..69ff07137a0 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -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) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index eb9f35d00d1..f4c5e7f538c 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -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);