提交 a9f771a8 编写于 作者: B Benjamin Pasero

highContrastBorder => contrastBorder, highContrastOutline => activeContrastBorder

上级 9b7a8813
......@@ -7,7 +7,7 @@
import 'vs/css!./selections';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { editorSelection, editorInactiveSelection, highContrastOutline } from 'vs/platform/theme/common/colorRegistry';
import { editorSelection, editorInactiveSelection, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay';
import { ViewContext } from 'vs/editor/common/view/viewContext';
import { HorizontalRange, LineVisibleRanges, RenderingContext } from 'vs/editor/common/view/renderingContext';
......@@ -410,7 +410,7 @@ registerThemingParticipant((theme, collector) => {
collector.addRule(`.monaco-editor.${theme.selector} .selected-text { background-color: ${editorInactiveSelectionColor}; }`);
}
// IE/Edge specific rules
let outline = theme.getColor(highContrastOutline);
let outline = theme.getColor(activeContrastBorder);
if (outline) {
collector.addRule(`.monaco-editor.ie.hc-black .view-overlays.focused .selected-text { background: none; border: 2px solid ${outline}; }`);
collector.addRule(`.monaco-editor.edge.hc-black .view-overlays.focused .selected-text { background: none; border: 2px solid ${outline}; }`);
......
......@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import nls = require('vs/nls');
import { registerColor, editorBackground, highContrastOutline } from 'vs/platform/theme/common/colorRegistry';
import { registerColor, editorBackground, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { Color } from 'vs/base/common/color';
......@@ -32,7 +32,7 @@ registerThemingParticipant((theme, collector) => {
if (rangeHighlight) {
collector.addRule(`.monaco-editor.${theme.selector} .rangeHighlight { background-color: ${rangeHighlight}; }`);
}
let outline = theme.getColor(highContrastOutline);
let outline = theme.getColor(activeContrastBorder);
if (outline) {
collector.addRule(`.monaco-editor.${theme.selector} .rangeHighlight { border: 1px dotted ${outline}; }; }`);
}
......
......@@ -26,7 +26,7 @@ import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from 'vs/editor/b
import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions';
import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { editorWidgetBackground, widgetShadow, highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { editorWidgetBackground, widgetShadow, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
const CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new RawContextKey<boolean>('accessibilityHelpWidgetVisible', false);
const TOGGLE_EXPERIMENTAL_SCREEN_READER_SUPPORT_COMMAND_ID = 'toggleExperimentalScreenReaderSupport';
......@@ -266,7 +266,7 @@ registerThemingParticipant((theme, collector) => {
collector.addRule(`.monaco-editor.${theme.selector} .accessibilityHelpWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`);
}
let hcBorder = theme.getColor(highContrastBorder);
let hcBorder = theme.getColor(contrastBorder);
if (hcBorder) {
collector.addRule(`.monaco-editor.${theme.selector} .accessibilityHelpWidget { border: 2px solid ${hcBorder}; }`);
}
......
......@@ -14,7 +14,7 @@ import { FindReplaceState } from 'vs/editor/contrib/find/common/findState';
import { CaseSensitiveCheckbox, WholeWordsCheckbox } from 'vs/base/browser/ui/findinput/findInputCheckboxes';
import { RunOnceScheduler } from 'vs/base/common/async';
import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { inputActiveOptionBorder, editorWidgetBackground, highContrastBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry';
import { inputActiveOptionBorder, editorWidgetBackground, contrastBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry';
export class FindOptionsWidget extends Widget implements IOverlayWidget {
......@@ -182,7 +182,7 @@ registerThemingParticipant((theme, collector) => {
collector.addRule(`.monaco-editor.${theme.selector} .findOptionsWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`);
}
let hcBorder = theme.getColor(highContrastBorder);
let hcBorder = theme.getColor(contrastBorder);
if (hcBorder) {
collector.addRule(`.monaco-editor.${theme.selector} .findOptionsWidget { border: 2px solid ${hcBorder}; }`);
}
......
......@@ -26,7 +26,7 @@ import { CONTEXT_FIND_INPUT_FOCUSSED } from 'vs/editor/contrib/find/common/findC
import { ITheme, registerThemingParticipant, IThemeService } from 'vs/platform/theme/common/themeService';
import { Color } from 'vs/base/common/color';
import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions';
import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, highContrastOutline, highContrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, widgetShadow, inputForeground, inputBorder, infoBackground, infoBorder, warningBackground, warningBorder, errorBackground, errorBorder } from 'vs/platform/theme/common/colorRegistry';
import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, activeContrastBorder, contrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, widgetShadow, inputForeground, inputBorder, infoBackground, infoBorder, warningBackground, warningBorder, errorBackground, errorBorder } from 'vs/platform/theme/common/colorRegistry';
export interface IFindController {
replace(): void;
......@@ -819,13 +819,13 @@ registerThemingParticipant((theme, collector) => {
collector.addRule(`.monaco-editor.${theme.selector} .find-widget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`);
}
let hcOutline = theme.getColor(highContrastOutline);
let hcOutline = theme.getColor(activeContrastBorder);
if (hcOutline) {
collector.addRule(`.monaco-editor.${theme.selector} .findScope { border: 1px dashed ${hcOutline.transparent(0.4)}; }`);
collector.addRule(`.monaco-editor.${theme.selector} .currentFindMatch { border: 2px solid ${hcOutline}; padding: 1px; -moz-box-sizing: border-box; box-sizing: border-box; }`);
collector.addRule(`.monaco-editor.${theme.selector} .findMatch { border: 1px dotted ${hcOutline}; -moz-box-sizing: border-box; box-sizing: border-box; }`);
}
let hcBorder = theme.getColor(highContrastBorder);
let hcBorder = theme.getColor(contrastBorder);
if (hcBorder) {
collector.addRule(`.monaco-editor.${theme.selector} .find-widget { border: 2px solid ${hcBorder}; }`);
}
......
......@@ -39,7 +39,7 @@ import { EmbeddedCodeEditorWidget } from 'vs/editor/browser/widget/embeddedCodeE
import { PeekViewWidget, IPeekViewService } from 'vs/editor/contrib/zoneWidget/browser/peekViewWidget';
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 { registerColor, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { registerThemingParticipant, ITheme, IThemeService } from 'vs/platform/theme/common/themeService';
import { attachListStyler } from 'vs/platform/theme/common/styler';
import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents';
......@@ -822,7 +822,7 @@ registerThemingParticipant((theme, collector) => {
if (referenceHighlightColor) {
collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .preview .reference-decoration { background-color: ${referenceHighlightColor}; }`);
}
let hcOutline = theme.getColor(highContrastOutline);
let hcOutline = theme.getColor(activeContrastBorder);
if (hcOutline) {
collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`);
collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .preview .reference-decoration { border: 2px solid ${hcOutline}; box-sizing: border-box; }`);
......
......@@ -29,7 +29,7 @@ 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, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { registerColor, editorWidgetBackground, highContrastBorder, listFocusBackground, highContrastOutline, listHighlightForeground } from 'vs/platform/theme/common/colorRegistry';
import { registerColor, editorWidgetBackground, contrastBorder, listFocusBackground, activeContrastBorder, listHighlightForeground } from 'vs/platform/theme/common/colorRegistry';
const sticky = false; // for development purposes
......@@ -48,7 +48,7 @@ interface ISuggestionTemplateData {
* Suggest widget colors
*/
export const editorSuggestWidgetBackground = registerColor('editorSuggestWidgetBackground', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('editorSuggestWidgetBackground', 'Background color of the suggest widget.'));
export const editorSuggestWidgetBorder = registerColor('editorSuggestWidgetBorder', { dark: '#454545', light: '#C8C8C8', hc: highContrastBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.'));
export const editorSuggestWidgetBorder = registerColor('editorSuggestWidgetBorder', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.'));
const colorRegExp = /^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i;
function matchesColor(text: string) {
......@@ -383,7 +383,7 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
});
this.toDispose = [
attachListStyler(this.list, themeService, { listInactiveFocusBackground: listFocusBackground, listInactiveFocusOutline: highContrastOutline }),
attachListStyler(this.list, themeService, { listInactiveFocusBackground: listFocusBackground, listInactiveFocusOutline: activeContrastBorder }),
themeService.onThemeChange(t => this.onThemeChange(t)),
editor.onDidBlurEditorText(() => this.onEditorBlur()),
this.list.onSelectionChange(e => this.onListSelection(e)),
......
......@@ -15,7 +15,7 @@ import { CommonEditorRegistry, commonEditorContribution } from 'vs/editor/common
import { DocumentHighlight, DocumentHighlightKind, DocumentHighlightProviderRegistry } from 'vs/editor/common/modes';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { Position } from 'vs/editor/common/core/position';
import { registerColor, editorSelectionHighlight, highContrastOutline } from 'vs/platform/theme/common/colorRegistry';
import { registerColor, editorSelectionHighlight, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents';
......@@ -330,7 +330,7 @@ registerThemingParticipant((theme, collector) => {
if (wordHighlightStrong) {
collector.addRule(`.monaco-editor.${theme.selector} .wordHighlightStrong { background-color: ${wordHighlightStrong}; }`);
}
let hcOutline = theme.getColor(highContrastOutline);
let hcOutline = theme.getColor(activeContrastBorder);
if (hcOutline) {
collector.addRule(`.monaco-editor.${theme.selector} .selectionHighlight { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`);
collector.addRule(`.monaco-editor.${theme.selector} .wordHighlight { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`);
......
......@@ -122,8 +122,8 @@ export function registerColor(id: string, defaults: ColorDefaults, description:
export const foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#6C6C6C', hc: '#FFFFFF' }, nls.localize('foreground', "Overall foreground color. This color is only used if not overridden by a component."));
export const focusBorder = registerColor('focusBorder', { dark: Color.fromRGBA(new RGBA(14, 99, 156)).transparent(0.6), light: Color.fromRGBA(new RGBA(0, 122, 204)).transparent(0.4), hc: '#F38518' }, nls.localize('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component."));
export const highContrastBorder = registerColor('highContrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('highContrastBorder', "Border color to separate components when high contrast theme is enabled."));
export const highContrastOutline = registerColor('highContrastOutline', { light: null, dark: null, hc: focusBorder }, nls.localize('highContrastOutline', "Outline color for active components when high contrast theme is enabled."));
export const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('contrastBorder', "An extra border around elements to separate them from others for greater contrast."));
export const activeContrastBorder = registerColor('activeContrastBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast."));
export const infoBackground = registerColor('infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('infoBackground', "Overall info background color. This color is only used if not overridden by a component."));
export const infoBorder = registerColor('infoBorder', { dark: '#55AAFF', light: '#009CCC', hc: '#6FC3DF' }, nls.localize('infoBorder', "Overall info border color. This color is only used if not overridden by a component."));
......@@ -137,12 +137,12 @@ export const widgetShadow = registerColor('widgetShadow', { dark: '#000000', lig
export const inputBackground = registerColor('inputBoxBackground', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('inputBoxBackground', "Input box background."));
export const inputForeground = registerColor('inputBoxForeground', { dark: foreground, light: foreground, hc: foreground }, nls.localize('inputBoxForeground', "Input box foreground."));
export const inputBorder = registerColor('inputBoxBorder', { dark: null, light: null, hc: highContrastBorder }, nls.localize('inputBoxBorder', "Input box border."));
export const inputActiveOptionBorder = registerColor('inputBoxActiveOptionBorder', { dark: '#007ACC', light: '#007ACC', hc: highContrastOutline }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields."));
export const inputBorder = registerColor('inputBoxBorder', { dark: null, light: null, hc: contrastBorder }, nls.localize('inputBoxBorder', "Input box border."));
export const inputActiveOptionBorder = registerColor('inputBoxActiveOptionBorder', { dark: '#007ACC', light: '#007ACC', hc: activeContrastBorder }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields."));
export const selectBackground = registerColor('dropdownBackground', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('dropdownBackground', "Dropdown background."));
export const selectForeground = registerColor('dropdownForeground', { dark: '#F0F0F0', light: null, hc: Color.white }, nls.localize('dropdownForeground', "Dropdown foreground."));
export const selectBorder = registerColor('dropdownBorder', { dark: selectBackground, light: '#CECECE', hc: highContrastBorder }, nls.localize('dropdownBorder', "Dropdown border."));
export const selectBorder = registerColor('dropdownBorder', { dark: selectBackground, light: '#CECECE', hc: contrastBorder }, nls.localize('dropdownBorder', "Dropdown border."));
export const listFocusBackground = registerColor('listFocusBackground', { dark: '#073655', light: '#DCEBFC', hc: null }, nls.localize('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
export const listActiveSelectionBackground = registerColor('listActiveSelectionBackground', { dark: '#0E639C', light: '#4FA7FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
......
......@@ -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, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listFocusAndSelectionBackground, listFocusAndSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, infoBorder, infoBackground, warningBorder, warningBackground, errorBorder, errorBackground, highContrastOutline, buttonForeground, buttonBackground, buttonHoverBackground } from 'vs/platform/theme/common/colorRegistry';
import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listFocusAndSelectionBackground, listFocusAndSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, infoBorder, infoBackground, warningBorder, warningBackground, errorBorder, errorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground } from 'vs/platform/theme/common/colorRegistry';
import { IDisposable } from 'vs/base/common/lifecycle';
import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme';
......@@ -126,7 +126,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer
return attachStyler(themeService, widget, {
foreground: (style && style.foreground) || foreground,
background: (style && style.background) || editorBackground,
borderColor: style && style.borderColor || highContrastBorder,
borderColor: style && style.borderColor || contrastBorder,
widgetShadow: style && style.widgetShadow || widgetShadow,
pickerGroupForeground: style && style.pickerGroupForeground || pickerGroupForeground,
pickerGroupBorder: style && style.pickerGroupBorder || pickerGroupBorder,
......@@ -147,9 +147,9 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer
listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground,
listHoverBackground: (style && style.listHoverBackground) || listHoverBackground,
listDropBackground: (style && style.listDropBackground) || listDropBackground,
listFocusOutline: (style && style.listFocusOutline) || highContrastOutline,
listSelectionOutline: (style && style.listSelectionOutline) || highContrastOutline,
listHoverOutline: (style && style.listHoverOutline) || highContrastOutline
listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder,
listSelectionOutline: (style && style.listSelectionOutline) || activeContrastBorder,
listHoverOutline: (style && style.listHoverOutline) || activeContrastBorder
});
}
......@@ -178,17 +178,17 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService,
listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground,
listHoverBackground: (style && style.listHoverBackground) || listHoverBackground,
listDropBackground: (style && style.listDropBackground) || listDropBackground,
listFocusOutline: (style && style.listFocusOutline) || highContrastOutline,
listSelectionOutline: (style && style.listSelectionOutline) || highContrastOutline,
listHoverOutline: (style && style.listHoverOutline) || highContrastOutline,
listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder,
listSelectionOutline: (style && style.listSelectionOutline) || activeContrastBorder,
listHoverOutline: (style && style.listHoverOutline) || activeContrastBorder,
listInactiveFocusOutline: style && style.listInactiveFocusOutline // not defined by default, only opt-in
});
}
export function attachHeaderViewStyler(widget: IThemable, themeService: IThemeService, style?: { headerBackground?: ColorIdentifier, highContrastBorder?: ColorIdentifier }): IDisposable {
export function attachHeaderViewStyler(widget: IThemable, themeService: IThemeService, style?: { headerBackground?: ColorIdentifier, contrastBorder?: ColorIdentifier }): IDisposable {
return attachStyler(themeService, widget, {
headerBackground: (style && style.headerBackground) || SIDE_BAR_SECTION_HEADER_BACKGROUND,
headerHighContrastBorder: (style && style.highContrastBorder) || highContrastBorder
headerHighContrastBorder: (style && style.contrastBorder) || contrastBorder
});
}
......
......@@ -25,7 +25,7 @@ import { IViewletService, } from 'vs/workbench/services/viewlet/browser/viewlet'
import { IPartService, Parts } from 'vs/workbench/services/part/common/partService';
import { IThemeService, ITheme, registerThemingParticipant, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND, ACTIVITY_BAR_FOREGROUND } from 'vs/workbench/common/theme';
import { highContrastBorder, highContrastOutline, focusBorder } from 'vs/platform/theme/common/colorRegistry';
import { contrastBorder, activeContrastBorder, focusBorder } from 'vs/platform/theme/common/colorRegistry';
export class ActivityAction extends Action {
private badge: IBadge;
......@@ -176,7 +176,7 @@ export class ActivityActionItem extends ThemableActivityActionItem {
if (this.$badgeContent) {
const badgeForeground = theme.getColor(ACTIVITY_BAR_BADGE_FOREGROUND);
const badgeBackground = theme.getColor(ACTIVITY_BAR_BADGE_BACKGROUND);
const hcBorder = theme.getColor(highContrastBorder);
const hcBorder = theme.getColor(contrastBorder);
this.$badgeContent.style('color', badgeForeground ? badgeForeground.toString() : null);
this.$badgeContent.style('background-color', badgeBackground ? badgeBackground.toString() : null);
......@@ -629,7 +629,7 @@ export class ToggleViewletPinnedAction extends Action {
registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
// Styling with Outline color (e.g. high contrast theme)
const outline = theme.getColor(highContrastOutline);
const outline = theme.getColor(activeContrastBorder);
if (outline) {
collector.addRule(`
.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:before {
......
......@@ -32,7 +32,7 @@ import { ToggleActivityBarVisibilityAction } from 'vs/workbench/browser/actions/
import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ACTIVITY_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import { highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { contrastBorder } from 'vs/platform/theme/common/colorRegistry';
interface IViewletActivity {
badge: IBadge;
......@@ -222,7 +222,7 @@ export class ActivitybarPart extends Part implements IActivityBarService {
const background = this.getColor(ACTIVITY_BAR_BACKGROUND);
container.style('background-color', background);
const hcBorder = this.getColor(highContrastBorder);
const hcBorder = this.getColor(contrastBorder);
const isPositionLeft = this.partService.getSideBarPosition() === SideBarPosition.LEFT;
container.style('box-sizing', hcBorder && isPositionLeft ? 'border-box' : null);
container.style('border-right-width', hcBorder && isPositionLeft ? '1px' : null);
......
......@@ -34,7 +34,7 @@ import { extractResources } from 'vs/base/browser/dnd';
import { IWindowService } from 'vs/platform/windows/common/windows';
import { getCodeEditor } from 'vs/editor/common/services/codeEditorService';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { editorBackground, highContrastBorder, highContrastOutline } from 'vs/platform/theme/common/colorRegistry';
import { editorBackground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { Themable, TABS_CONTAINER_BACKGROUND, EDITOR_GROUP_HEADER_BACKGROUND, EDITOR_GROUP_BORDER_COLOR, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND } from 'vs/workbench/common/theme';
export enum Rochade {
......@@ -1009,14 +1009,14 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
silo.style('background-color', this.getColor(editorBackground));
// Border
silo.style('border-left-color', index > Position.ONE ? (this.getColor(highContrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR)) : null);
silo.style('border-top-color', index > Position.ONE ? (this.getColor(highContrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR)) : null);
silo.style('border-left-color', index > Position.ONE ? (this.getColor(contrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR)) : null);
silo.style('border-top-color', index > Position.ONE ? (this.getColor(contrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR)) : null);
});
// Title control
POSITIONS.forEach(position => {
const container = this.getTitleAreaControl(position).getContainer();
const hcBorder = this.getColor(highContrastBorder);
const hcBorder = this.getColor(contrastBorder);
container.style.backgroundColor = this.getColor(this.tabOptions.showTabs ? TABS_CONTAINER_BACKGROUND : EDITOR_GROUP_HEADER_BACKGROUND);
container.style.borderBottomWidth = (hcBorder && this.tabOptions.showTabs) ? '1px' : null;
......@@ -1226,7 +1226,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
const containers = $this.visibleEditors.filter(e => !!e).map(e => e.getContainer());
containers.forEach((container, index) => {
if (container && DOM.isAncestor(target, container.getHTMLElement())) {
const hcOutline = $this.getColor(highContrastOutline);
const hcOutline = $this.getColor(activeContrastBorder);
overlay = $('div').style({
top: $this.tabOptions.showTabs ? `${EditorGroupsControl.EDITOR_TITLE_HEIGHT}px` : 0,
height: $this.tabOptions.showTabs ? `calc(100% - ${EditorGroupsControl.EDITOR_TITLE_HEIGHT}px` : '100%',
......@@ -1549,7 +1549,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
if (isDragging) {
this.parent.addClass('dragging');
silo.addClass('dragging');
borderColor = (this.getColor(highContrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR));
borderColor = (this.getColor(contrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR));
} else {
this.parent.removeClass('dragging');
silo.removeClass('dragging');
......@@ -1569,7 +1569,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
const background = this.getColor(isDropping ? EDITOR_DRAG_AND_DROP_BACKGROUND : groupCount > 0 ? EDITOR_GROUP_BACKGROUND : null);
element.style.backgroundColor = background;
const hcOutline = this.getColor(highContrastOutline);
const hcOutline = this.getColor(activeContrastBorder);
element.style.outlineColor = isDropping ? hcOutline : null;
element.style.outlineStyle = isDropping && hcOutline ? 'dashed' : null;
element.style.outlineWidth = isDropping && hcOutline ? '2px' : null;
......
......@@ -41,7 +41,7 @@ import { DelegatingWorkbenchEditorService } from 'vs/workbench/services/editor/b
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND, TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND, TAB_INACTIVE_GROUP_ACTIVE_FOREGROUND, TAB_INACTIVE_GROUP_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vs/workbench/common/theme';
import { highContrastOutline, highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
interface IEditorInputLabel {
editor: IEditorInput;
......@@ -219,7 +219,7 @@ export class TabsTitleControl extends TitleControl {
element.style.backgroundColor = isDND ? this.getColor(EDITOR_DRAG_AND_DROP_BACKGROUND) : noDNDBackgroundColor;
// Outline
const hcOutline = this.getColor(highContrastOutline);
const hcOutline = this.getColor(activeContrastBorder);
if (hcOutline && isDND) {
element.style.outlineWidth = '2px';
element.style.outlineStyle = 'dashed';
......@@ -272,9 +272,9 @@ export class TabsTitleControl extends TitleControl {
// Container
tabContainer.setAttribute('aria-label', `${name}, tab`);
tabContainer.title = title;
tabContainer.style.borderLeftColor = (index !== 0) ? (this.getColor(highContrastBorder) || this.getColor(TAB_BORDER)) : null;
tabContainer.style.borderRightColor = (index === editorsOfGroup.length - 1) ? (this.getColor(highContrastBorder) || this.getColor(TAB_BORDER)) : null;
tabContainer.style.outlineColor = this.getColor(highContrastOutline);
tabContainer.style.borderLeftColor = (index !== 0) ? (this.getColor(contrastBorder) || this.getColor(TAB_BORDER)) : null;
tabContainer.style.borderRightColor = (index === editorsOfGroup.length - 1) ? (this.getColor(contrastBorder) || this.getColor(TAB_BORDER)) : null;
tabContainer.style.outlineColor = this.getColor(activeContrastBorder);
const tabOptions = this.editorGroupService.getTabOptions();
['off', 'left'].forEach(option => {
......@@ -735,7 +735,7 @@ class TabActionRunner extends ActionRunner {
registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
// Styling with Outline color (e.g. high contrast theme)
const outline = theme.getColor(highContrastOutline);
const outline = theme.getColor(activeContrastBorder);
if (outline) {
collector.addRule(`
.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.active,
......
......@@ -26,7 +26,7 @@ import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/acti
import { ClosePanelAction, PanelAction, ToggleMaximizedPanelAction } from 'vs/workbench/browser/parts/panel/panelActions';
import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { PANEL_BACKGROUND, PANEL_BORDER_COLOR, PANEL_ACTIVE_TITLE_COLOR, PANEL_INACTIVE_TITLE_COLOR, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme';
import { highContrastOutline, focusBorder, highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { activeContrastBorder, focusBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
export class PanelPart extends CompositePart<Panel> implements IPanelService {
......@@ -104,7 +104,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
container.style('background-color', this.getColor(PANEL_BACKGROUND));
const title = this.getTitleArea();
title.style('border-top-color', this.getColor(highContrastBorder) || this.getColor(PANEL_BORDER_COLOR));
title.style('border-top-color', this.getColor(contrastBorder) || this.getColor(PANEL_BORDER_COLOR));
}
public openPanel(id: string, focus?: boolean): TPromise<Panel> {
......@@ -225,9 +225,9 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
`);
// Styling with Outline color (e.g. high contrast theme)
const outline = theme.getColor(highContrastOutline);
const outline = theme.getColor(activeContrastBorder);
if (outline) {
const outline = theme.getColor(highContrastOutline);
const outline = theme.getColor(activeContrastBorder);
collector.addRule(`
.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label.checked,
......
......@@ -25,7 +25,7 @@ import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import Event from 'vs/base/common/event';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { contrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
export class SidebarPart extends CompositePart<Viewlet> {
......@@ -83,7 +83,7 @@ export class SidebarPart extends CompositePart<Viewlet> {
container.style('background-color', this.getColor(SIDE_BAR_BACKGROUND));
const hcBorder = this.getColor(highContrastBorder);
const hcBorder = this.getColor(contrastBorder);
const isPositionLeft = this.partService.getSideBarPosition() === SideBarPosition.LEFT;
container.style('border-right-width', hcBorder && isPositionLeft ? '1px' : null);
container.style('border-right-style', hcBorder && isPositionLeft ? 'solid' : null);
......
......@@ -29,7 +29,7 @@ import { Action } from 'vs/base/common/actions';
import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { STATUS_BAR_BACKGROUND, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_ACTIVE_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND } from 'vs/workbench/common/theme';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { contrastBorder } from 'vs/platform/theme/common/colorRegistry';
export class StatusbarPart extends Part implements IStatusbarService {
......@@ -139,7 +139,7 @@ export class StatusbarPart extends Part implements IStatusbarService {
container.style('color', this.getColor(STATUS_BAR_FOREGROUND));
container.style('background-color', this.getColor(this.contextService.hasWorkspace() ? STATUS_BAR_BACKGROUND : STATUS_BAR_NO_FOLDER_BACKGROUND));
const hcBorder = this.getColor(highContrastBorder);
const hcBorder = this.getColor(contrastBorder);
container.style('border-top-width', hcBorder ? '1px' : null);
container.style('border-top-style', hcBorder ? 'solid' : null);
container.style('border-top-color', hcBorder);
......
......@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import nls = require('vs/nls');
import { registerColor, editorBackground, highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { registerColor, editorBackground, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { IDisposable, Disposable, dispose } from 'vs/base/common/lifecycle';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
import { Color, RGBA } from 'vs/base/common/color';
......@@ -32,7 +32,7 @@ export const TAB_INACTIVE_BACKGROUND = registerColor('tabInactiveBackground', {
export const TAB_BORDER = registerColor('tabBorder', {
dark: '#252526',
light: '#F3F3F3',
hc: highContrastBorder
hc: contrastBorder
}, nls.localize('tabBorder', "Border to separate tabs from each other. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND = registerColor('tabActiveEditorGroupActiveForeground', {
......@@ -78,7 +78,7 @@ export const EDITOR_GROUP_HEADER_BACKGROUND = registerColor('editorGroupHeaderBa
export const EDITOR_GROUP_BORDER_COLOR = registerColor('editorGroupBorder', {
dark: '#444444',
light: '#E7E7E7',
hc: highContrastBorder
hc: contrastBorder
}, nls.localize('editorGroupBorder', "Color to separate multiple editor groups from each other. Editor groups are the containers of editors."));
export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorDragAndDropBackground', {
......@@ -105,7 +105,7 @@ export const PANEL_BACKGROUND = registerColor('panelBackground', {
export const PANEL_BORDER_COLOR = registerColor('panelBorder', {
dark: Color.fromRGBA(new RGBA(128, 128, 128)).transparent(0.35),
light: Color.fromRGBA(new RGBA(128, 128, 128)).transparent(0.35),
hc: highContrastBorder
hc: contrastBorder
}, nls.localize('panelBorder', "Panel border color on the top separating to the editor. Panels are shown below the editor area and contain views like output and integrated terminal."));
export const PANEL_ACTIVE_TITLE_COLOR = registerColor('panelActiveTitleForeground', {
......@@ -123,7 +123,7 @@ export const PANEL_INACTIVE_TITLE_COLOR = registerColor('panelInactiveTitleForeg
export const PANEL_ACTIVE_TITLE_BORDER = registerColor('panelActiveTitleBorder', {
dark: '#404047',
light: '#CCCEDA',
hc: highContrastBorder
hc: contrastBorder
}, nls.localize('panelActiveTitleBorder', "Border color for the active panel title. Panels are shown below the editor area and contain views like output and integrated terminal."));
......
......@@ -49,7 +49,7 @@ import { KeyboardMapperFactory } from 'vs/workbench/services/keybinding/electron
import { Themable, EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vs/workbench/common/theme';
import { remote, ipcRenderer as ipc, webFrame } from 'electron';
import { highContrastOutline } from 'vs/platform/theme/common/colorRegistry';
import { activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
const dialog = remote.dialog;
......@@ -134,7 +134,7 @@ export class ElectronWindow extends Themable {
// Find out if folders are dragged and show the appropiate feedback then
this.includesFolder(draggedExternalResources).done(includesFolder => {
if (includesFolder) {
const hcOutline = this.getColor(highContrastOutline);
const hcOutline = this.getColor(activeContrastBorder);
dropOverlay = $(window.document.getElementById(this.partService.getWorkbenchElementId()))
.div({
id: 'monaco-workbench-drop-overlay'
......
......@@ -28,7 +28,7 @@ import { IMessageService } from 'vs/platform/message/common/message';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { Themable } from 'vs/workbench/common/theme';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { registerColor, highContrastBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry';
import { registerColor, contrastBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry';
import { localize } from 'vs/nls';
const $ = builder.$;
......@@ -149,7 +149,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
const widgetShadowColor = this.getColor(widgetShadow);
this.$el.style('box-shadow', widgetShadowColor ? `0 5px 8px ${widgetShadowColor}` : null);
const hcBorder = this.getColor(highContrastBorder);
const hcBorder = this.getColor(contrastBorder);
this.$el.style('border-style', hcBorder ? 'solid' : null);
this.$el.style('border-width', hcBorder ? '1px' : null);
this.$el.style('border-color', hcBorder);
......
......@@ -50,7 +50,7 @@ import { IActivityBarService, ProgressBadge, NumberBadge } from 'vs/workbench/se
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 { inputForeground, inputBackground, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { attachListStyler } from 'vs/platform/theme/common/styler';
interface SearchInputEvent extends Event {
......@@ -146,7 +146,7 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet {
public updateStyles(): void {
super.updateStyles();
const hcBorder = this.getColor(highContrastBorder);
const hcBorder = this.getColor(contrastBorder);
this.searchBox.style.backgroundColor = this.getColor(inputBackground);
this.searchBox.style.color = this.getColor(inputForeground);
......
......@@ -22,7 +22,7 @@ import { KeyCode } from 'vs/base/common/keyCodes';
import { NOTIFICATIONS_FOREGROUND, NOTIFICATIONS_BACKGROUND } from 'vs/workbench/common/theme';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { highContrastBorder, buttonBackground, buttonHoverBackground, widgetShadow, errorBorder, warningBorder, infoBorder } from 'vs/platform/theme/common/colorRegistry';
import { contrastBorder, buttonBackground, buttonHoverBackground, widgetShadow, errorBorder, warningBorder, infoBorder } from 'vs/platform/theme/common/colorRegistry';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { Color } from 'vs/base/common/color';
......@@ -105,7 +105,7 @@ export class MessageList {
this.background = theme.getColor(NOTIFICATIONS_BACKGROUND);
this.foreground = theme.getColor(NOTIFICATIONS_FOREGROUND);
this.widgetShadow = theme.getColor(widgetShadow);
this.outlineBorder = theme.getColor(highContrastBorder);
this.outlineBorder = theme.getColor(contrastBorder);
this.buttonBackground = theme.getColor(buttonBackground);
this.infoBackground = theme.getColor(infoBorder);
this.warningBackground = theme.getColor(warningBorder);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册