Merge pull request #54474 from Microsoft/electron20x/editor-opacity

Workaround duplicate rendered characters in Electron 2.0.x
This commit is contained in:
Alexandru Dima 2018-07-20 16:10:09 +02:00 committed by GitHub
commit 2bb602172d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -212,7 +212,7 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider {
const _CSS_MAP: { [prop: string]: string; } = {
color: 'color:{0} !important;',
opacity: 'opacity:{0};',
opacity: 'opacity:{0}; will-change: opacity;', // TODO@Ben: 'will-change: opacity' is a workaround for https://github.com/Microsoft/vscode/issues/52196
backgroundColor: 'background-color:{0};',
outline: 'outline:{0};',

View file

@ -1805,7 +1805,7 @@ registerThemingParticipant((theme, collector) => {
const unnecessaryForeground = theme.getColor(editorUnnecessaryCodeOpacity);
if (unnecessaryForeground) {
collector.addRule(`.${SHOW_UNUSED_ENABLED_CLASS} .monaco-editor .${ClassName.EditorUnnecessaryInlineDecoration} { opacity: ${unnecessaryForeground.rgba.a}; }`);
collector.addRule(`.${SHOW_UNUSED_ENABLED_CLASS} .monaco-editor .${ClassName.EditorUnnecessaryInlineDecoration} { opacity: ${unnecessaryForeground.rgba.a}; will-change: opacity; }`); // TODO@Ben: 'will-change: opacity' is a workaround for https://github.com/Microsoft/vscode/issues/52196
}
const unnecessaryBorder = theme.getColor(editorUnnecessaryCodeBorder);