Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d0ad42a0
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
d0ad42a0
编写于
3月 26, 2018
作者:
A
Alexandru Dima
提交者:
GitHub
3月 26, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #46029 from gizm0bill/46027_fix_guides_display
Fixes #46027 by using box-shadow css to render guides
上级
efa187df
667a6c06
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
6 deletion
+8
-6
src/vs/editor/browser/viewParts/indentGuides/indentGuides.css
...vs/editor/browser/viewParts/indentGuides/indentGuides.css
+2
-0
src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts
src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts
+2
-3
src/vs/editor/browser/viewParts/rulers/rulers.css
src/vs/editor/browser/viewParts/rulers/rulers.css
+2
-0
src/vs/editor/browser/viewParts/rulers/rulers.ts
src/vs/editor/browser/viewParts/rulers/rulers.ts
+2
-3
未找到文件。
src/vs/editor/browser/viewParts/indentGuides/indentGuides.css
浏览文件 @
d0ad42a0
...
...
@@ -9,4 +9,6 @@
*/
.monaco-editor
.lines-content
.cigr
{
position
:
absolute
;
--box-shadow-color
:
rgba
(
0
,
0
,
0
,
0
);
box-shadow
:
1px
0
0
0
var
(
--box-shadow-color
)
inset
;
}
src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts
浏览文件 @
d0ad42a0
...
...
@@ -12,7 +12,6 @@ import { RenderingContext } from 'vs/editor/common/view/renderingContext';
import
*
as
viewEvents
from
'
vs/editor/common/view/viewEvents
'
;
import
{
registerThemingParticipant
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
editorIndentGuides
}
from
'
vs/editor/common/view/editorColorRegistry
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
export
class
IndentGuidesOverlay
extends
DynamicViewOverlay
{
...
...
@@ -94,7 +93,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay {
const
tabSize
=
this
.
_context
.
model
.
getTabSize
();
const
tabWidth
=
tabSize
*
this
.
_spaceWidth
;
const
lineHeight
=
this
.
_lineHeight
;
const
indentGuideWidth
=
dom
.
computeScreenAwareSize
(
1
)
;
const
indentGuideWidth
=
tabWidth
;
const
indents
=
this
.
_context
.
model
.
getLinesIndentGuides
(
visibleStartLineNumber
,
visibleEndLineNumber
);
...
...
@@ -131,6 +130,6 @@ export class IndentGuidesOverlay extends DynamicViewOverlay {
registerThemingParticipant
((
theme
,
collector
)
=>
{
let
editorGuideColor
=
theme
.
getColor
(
editorIndentGuides
);
if
(
editorGuideColor
)
{
collector
.
addRule
(
`.monaco-editor .lines-content .cigr {
background
-color:
${
editorGuideColor
}
; }`
);
collector
.
addRule
(
`.monaco-editor .lines-content .cigr {
--box-shadow
-color:
${
editorGuideColor
}
; }`
);
}
});
src/vs/editor/browser/viewParts/rulers/rulers.css
浏览文件 @
d0ad42a0
...
...
@@ -6,4 +6,6 @@
.monaco-editor
.view-ruler
{
position
:
absolute
;
top
:
0
;
--box-shadow-color
:
rgba
(
0
,
0
,
0
,
0
);
box-shadow
:
1px
0
0
0
var
(
--box-shadow-color
)
inset
;
}
\ No newline at end of file
src/vs/editor/browser/viewParts/rulers/rulers.ts
浏览文件 @
d0ad42a0
...
...
@@ -13,7 +13,6 @@ import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/v
import
*
as
viewEvents
from
'
vs/editor/common/view/viewEvents
'
;
import
{
registerThemingParticipant
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
editorRuler
}
from
'
vs/editor/common/view/editorColorRegistry
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
export
class
Rulers
extends
ViewPart
{
...
...
@@ -67,7 +66,7 @@ export class Rulers extends ViewPart {
}
if
(
currentCount
<
desiredCount
)
{
const
rulerWidth
=
dom
.
computeScreenAwareSize
(
1
);
const
rulerWidth
=
this
.
_context
.
model
.
getTabSize
(
);
let
addCount
=
desiredCount
-
currentCount
;
while
(
addCount
>
0
)
{
let
node
=
createFastDomNode
(
document
.
createElement
(
'
div
'
));
...
...
@@ -104,6 +103,6 @@ export class Rulers extends ViewPart {
registerThemingParticipant
((
theme
,
collector
)
=>
{
let
rulerColor
=
theme
.
getColor
(
editorRuler
);
if
(
rulerColor
)
{
collector
.
addRule
(
`.monaco-editor .view-ruler {
background
-color:
${
rulerColor
}
; }`
);
collector
.
addRule
(
`.monaco-editor .view-ruler {
--box-shadow
-color:
${
rulerColor
}
; }`
);
}
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录