提交 7a05099b 编写于 作者: P Peng Lyu

Fix #75279.

上级 a3587cab
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
import { Color } from 'vs/base/common/color'; import { Color } from 'vs/base/common/color';
import { IDisposable } from 'vs/base/common/lifecycle'; import { IDisposable } from 'vs/base/common/lifecycle';
import * as strings from 'vs/base/common/strings'; import * as strings from 'vs/base/common/strings';
import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { IConfigurationChangedEvent, EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions';
import { IPosition, Position } from 'vs/editor/common/core/position'; import { IPosition, Position } from 'vs/editor/common/core/position';
import { IRange, Range } from 'vs/editor/common/core/range'; import { IRange, Range } from 'vs/editor/common/core/range';
import * as editorCommon from 'vs/editor/common/editorCommon'; import * as editorCommon from 'vs/editor/common/editorCommon';
...@@ -668,12 +668,13 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel ...@@ -668,12 +668,13 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel
const fontInfo = this.configuration.editor.fontInfo; const fontInfo = this.configuration.editor.fontInfo;
const colorMap = this._getColorMap(); const colorMap = this._getColorMap();
const fontFamily = fontInfo.fontFamily === EDITOR_FONT_DEFAULTS.fontFamily ? fontInfo.fontFamily : `'${fontInfo.fontFamily}', ${EDITOR_FONT_DEFAULTS.fontFamily}`;
return ( return (
`<div style="` `<div style="`
+ `color: ${colorMap[ColorId.DefaultForeground]};` + `color: ${colorMap[ColorId.DefaultForeground]};`
+ `background-color: ${colorMap[ColorId.DefaultBackground]};` + `background-color: ${colorMap[ColorId.DefaultBackground]};`
+ `font-family: ${fontInfo.fontFamily};` + `font-family: ${fontFamily};`
+ `font-weight: ${fontInfo.fontWeight};` + `font-weight: ${fontInfo.fontWeight};`
+ `font-size: ${fontInfo.fontSize}px;` + `font-size: ${fontInfo.fontSize}px;`
+ `line-height: ${fontInfo.lineHeight}px;` + `line-height: ${fontInfo.lineHeight}px;`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册