diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 7d5d29074b54212e509ea7baad326128ecb1cc20..f75fc922c72e26946c85376618fc8dd208361204 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -174,7 +174,6 @@ export const buttonHoverBackground = registerColor('button.hoverBackground', { d export const badgeBackground = registerColor('badge.background', { dark: '#4D4D4D', light: '#BEBEBE', hc: Color.black }, nls.localize('badgeBackground', "Badge background color. Badges are small information labels, e.g. for search results count.")); export const badgeForeground = registerColor('badge.foreground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('badgeForeground', "Badge foreground color. Badges are small information labels, e.g. for search results count.")); -export const badgeBorder = registerColor('badge.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('badgeBorder', "Badge border color. Badges are small information labels, e.g. for search results count.")); export const scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); export const scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: transparent(contrastBorder, 0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index e5d088e794a8263ec89966984a485e452b28aee6..51504eaf7a5c243ace57bc0981c627cae3bbb395 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, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground, badgeBorder } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; @@ -49,13 +49,12 @@ export function attachCheckboxStyler(widget: IThemable, themeService: IThemeServ export function attachBadgeStyler(widget: IThemable, themeService: IThemeService, style?: { badgeBackground?: ColorIdentifier, - badgeForeground?: ColorIdentifier, - badgeBorder?: ColorIdentifier + badgeForeground?: ColorIdentifier }): IDisposable { return doAttachStyler(themeService, { badgeBackground: (style && style.badgeBackground) || badgeBackground, badgeForeground: (style && style.badgeForeground) || badgeForeground, - badgeBorder: (style && style.badgeBorder) || badgeBorder + badgeBorder: contrastBorder }, widget); } diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index 07b9ac2cbd9b8e98ccf37aa0865d2bcf0514d531..01b6ce74cfd7e5152d85f663b66d7ca311bb88f6 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -33,7 +33,7 @@ import { IListService } from 'vs/platform/list/browser/listService'; import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { badgeBackground, badgeForeground, badgeBorder } from "vs/platform/theme/common/colorRegistry"; +import { badgeBackground, badgeForeground, contrastBorder } from "vs/platform/theme/common/colorRegistry"; const $ = dom.$; @@ -89,10 +89,10 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { this.dirtyCountElement = dom.append(titleDiv, $('.monaco-count-badge')); - this.toDispose.push((attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, badgeBorder }, colors => { + this.toDispose.push((attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, contrastBorder }, colors => { const background = colors.badgeBackground ? colors.badgeBackground.toString() : null; const foreground = colors.badgeForeground ? colors.badgeForeground.toString() : null; - const border = colors.badgeBorder ? colors.badgeBorder.toString() : null; + const border = colors.contrastBorder ? colors.contrastBorder.toString() : null; this.dirtyCountElement.style.backgroundColor = background; this.dirtyCountElement.style.color = foreground; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts index ff38198dbbaf036c40dc172eee348fbcb5696699..a07b8a57be6d9330c3f4c4b3a8a9a213e67e96b0 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts @@ -27,7 +27,7 @@ import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/co import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { buttonBackground, buttonForeground, badgeBorder, badgeForeground, badgeBackground } from "vs/platform/theme/common/colorRegistry"; +import { buttonBackground, buttonForeground, badgeForeground, badgeBackground, contrastBorder } from "vs/platform/theme/common/colorRegistry"; export class SettingsGroupTitleWidget extends Widget implements IViewZone { @@ -263,10 +263,10 @@ export class SearchWidget extends Widget { this.domNode = DOM.append(parent, DOM.$('div.settings-header-widget')); this.createSearchContainer(DOM.append(this.domNode, DOM.$('div.settings-search-container'))); this.countElement = DOM.append(this.domNode, DOM.$('.settings-count-widget')); - this._register(attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, badgeBorder }, colors => { + this._register(attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, contrastBorder }, colors => { const background = colors.badgeBackground ? colors.badgeBackground.toString() : null; const foreground = colors.badgeForeground ? colors.badgeForeground.toString() : null; - const border = colors.badgeBorder ? colors.badgeBorder.toString() : null; + const border = colors.contrastBorder ? colors.contrastBorder.toString() : null; this.countElement.style.backgroundColor = background; this.countElement.style.color = foreground;