提交 5830a4af 编写于 作者: B Benjamin Pasero

theming - do not expose badge.border

上级 f97acb34
......@@ -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."));
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册