mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Use outlines in high contrast (#27580)
This commit is contained in:
parent
90bfb284fa
commit
c43cc5f0eb
|
@ -80,6 +80,9 @@ export default class MergeDectorator implements vscode.Disposable {
|
|||
isWholeLine: this.decorationUsesWholeLine,
|
||||
backgroundColor: new vscode.ThemeColor('merge.currentHeaderBackground'),
|
||||
color: new vscode.ThemeColor('editor.foreground'),
|
||||
outlineStyle: 'solid',
|
||||
outlineWidth: '1pt',
|
||||
outlineColor: new vscode.ThemeColor('merge.border'),
|
||||
after: {
|
||||
contentText: ' ' + localize('currentChange', '(Current change)'),
|
||||
color: new vscode.ThemeColor('descriptionForeground')
|
||||
|
@ -88,12 +91,18 @@ export default class MergeDectorator implements vscode.Disposable {
|
|||
|
||||
this.decorations['splitter'] = vscode.window.createTextEditorDecorationType({
|
||||
color: new vscode.ThemeColor('editor.foreground'),
|
||||
outlineStyle: 'solid',
|
||||
outlineWidth: '1pt',
|
||||
outlineColor: new vscode.ThemeColor('merge.border'),
|
||||
isWholeLine: this.decorationUsesWholeLine,
|
||||
});
|
||||
|
||||
this.decorations['incoming.header'] = vscode.window.createTextEditorDecorationType({
|
||||
backgroundColor: new vscode.ThemeColor('merge.incomingHeaderBackground'),
|
||||
color: new vscode.ThemeColor('editor.foreground'),
|
||||
outlineStyle: 'solid',
|
||||
outlineWidth: '1pt',
|
||||
outlineColor: new vscode.ThemeColor('merge.border'),
|
||||
isWholeLine: this.decorationUsesWholeLine,
|
||||
after: {
|
||||
contentText: ' ' + localize('incomingChange', '(Incoming change)'),
|
||||
|
|
|
@ -264,13 +264,15 @@ const incomingBaseColor = Color.fromHex('#40A6FF').transparent(headerTransparenc
|
|||
const contentTransparency = 0.4;
|
||||
const rulerTransparency = 1;
|
||||
|
||||
export const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBackground', { dark: currentBaseColor, light: currentBaseColor, hc: currentBaseColor }, nls.localize('mergeCurrentHeaderBackground', 'Current header background in inline merge-conflict.'));
|
||||
export const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflict.'));
|
||||
export const mergeIncomingHeaderBackground = registerColor('merge.incomingHeaderBackground', { dark: incomingBaseColor, light: incomingBaseColor, hc: incomingBaseColor }, nls.localize('mergeIncomingHeaderBackground', 'Incoming header background in inline merge-conflict.'));
|
||||
export const mergeIncomingContentBackground = registerColor('merge.incomingContentBackground', { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hc: transparent(mergeIncomingHeaderBackground, contentTransparency) }, nls.localize('mergeIncomingContentBackground', 'Incoming content background in inline merge-conflict.'));
|
||||
export const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBackground', { dark: currentBaseColor, light: currentBaseColor, hc: null }, nls.localize('mergeCurrentHeaderBackground', 'Current header background in inline merge-conflicts.'));
|
||||
export const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflicts.'));
|
||||
export const mergeIncomingHeaderBackground = registerColor('merge.incomingHeaderBackground', { dark: incomingBaseColor, light: incomingBaseColor, hc: null }, nls.localize('mergeIncomingHeaderBackground', 'Incoming header background in inline merge-conflicts.'));
|
||||
export const mergeIncomingContentBackground = registerColor('merge.incomingContentBackground', { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hc: transparent(mergeIncomingHeaderBackground, contentTransparency) }, nls.localize('mergeIncomingContentBackground', 'Incoming content background in inline merge-conflicts.'));
|
||||
|
||||
export const overviewRulerCurrentContentForeground = registerColor('editorOverviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: transparent(mergeCurrentHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflict.'));
|
||||
export const overviewRulerIncomingContentForeground = registerColor('editorOverviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: transparent(mergeIncomingHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflict.'));
|
||||
export const mergeBorder = registerColor('merge.border', { dark: null, light: null, hc: '#C3DF6F' }, nls.localize('mergeBorder', 'Border color on headers and the splitter in inline merge-conflicts.'));
|
||||
|
||||
export const overviewRulerCurrentContentForeground = registerColor('editorOverviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: mergeBorder }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflicts.'));
|
||||
export const overviewRulerIncomingContentForeground = registerColor('editorOverviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: mergeBorder }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflicts.'));
|
||||
|
||||
// ----- color functions
|
||||
|
||||
|
|
Loading…
Reference in a new issue