Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
04d5fc77
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,发现更多精彩内容 >>
提交
04d5fc77
编写于
5月 24, 2017
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
theming - dirty diff colors
上级
3215f190
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
48 addition
and
21 deletion
+48
-21
src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts
...orkbench/parts/scm/electron-browser/dirtydiffDecorator.ts
+45
-0
src/vs/workbench/parts/scm/electron-browser/media/dirtydiffDecorator.css
...h/parts/scm/electron-browser/media/dirtydiffDecorator.css
+3
-21
未找到文件。
src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts
浏览文件 @
04d5fc77
...
...
@@ -23,6 +23,10 @@ import URI from 'vs/base/common/uri';
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
ISCMService
}
from
'
vs/workbench/services/scm/common/scm
'
;
import
{
ModelDecorationOptions
}
from
"
vs/editor/common/model/textModelWithDecorations
"
;
import
{
registerThemingParticipant
,
ITheme
,
ICssStyleCollector
}
from
"
vs/platform/theme/common/themeService
"
;
import
{
registerColor
}
from
"
vs/platform/theme/common/colorRegistry
"
;
import
{
localize
}
from
"
vs/nls
"
;
import
{
Color
}
from
"
vs/base/common/color
"
;
class
DirtyDiffModelDecorator
{
...
...
@@ -266,3 +270,44 @@ export class DirtyDiffDecorator implements ext.IWorkbenchContribution {
this
.
decorators
=
null
;
}
}
export
const
editorGutterModifiedBackground
=
registerColor
(
'
editorGutter.modifiedBackground
'
,
{
dark
:
Color
.
fromHex
(
'
#00bcf2
'
).
transparent
(
0.6
),
light
:
Color
.
fromHex
(
'
#007acc
'
).
transparent
(
0.6
),
hc
:
Color
.
fromHex
(
'
#007acc
'
).
transparent
(
0.6
)
},
localize
(
'
editorGutterModifiedBackground
'
,
"
Editor gutter background color for lines that are modified.
"
));
export
const
editorGutterAddedBackground
=
registerColor
(
'
editorGutter.addedBackground
'
,
{
dark
:
Color
.
fromHex
(
'
#7fba00
'
).
transparent
(
0.6
),
light
:
Color
.
fromHex
(
'
#2d883e
'
).
transparent
(
0.6
),
hc
:
Color
.
fromHex
(
'
#2d883e
'
).
transparent
(
0.6
)
},
localize
(
'
editorGutterAddedBackground
'
,
"
Editor gutter background color for lines that are added.
"
));
export
const
editorGutteDeletedBackground
=
registerColor
(
'
editorGutter.deletedBackground
'
,
{
dark
:
Color
.
fromHex
(
'
#b9131a
'
).
transparent
(
0.76
),
light
:
Color
.
fromHex
(
'
#b9131a
'
).
transparent
(
0.76
),
hc
:
Color
.
fromHex
(
'
#b9131a
'
).
transparent
(
0.76
)
},
localize
(
'
editorGutterDeletedBackground
'
,
"
Editor gutter background color for lines that are deleted.
"
));
registerThemingParticipant
((
theme
:
ITheme
,
collector
:
ICssStyleCollector
)
=>
{
const
editorGutterModifiedBackgroundColor
=
theme
.
getColor
(
editorGutterModifiedBackground
);
if
(
editorGutterModifiedBackgroundColor
)
{
collector
.
addRule
(
`.monaco-editor .dirty-diff-modified-glyph { border-left: 3px solid
${
editorGutterModifiedBackgroundColor
}
; }`
);
}
const
editorGutterAddedBackgroundColor
=
theme
.
getColor
(
editorGutterAddedBackground
);
if
(
editorGutterAddedBackgroundColor
)
{
collector
.
addRule
(
`.monaco-editor .dirty-diff-added-glyph { border-left: 3px solid
${
editorGutterAddedBackgroundColor
}
; }`
);
}
const
editorGutteDeletedBackgroundColor
=
theme
.
getColor
(
editorGutteDeletedBackground
);
if
(
editorGutteDeletedBackgroundColor
)
{
collector
.
addRule
(
`
.monaco-editor .dirty-diff-deleted-glyph:after {
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
border-left: 4px solid
${
editorGutteDeletedBackgroundColor
}
;
}
`
);
}
});
\ No newline at end of file
src/vs/workbench/parts/scm/electron-browser/media/dirtydiffDecorator.css
浏览文件 @
04d5fc77
...
...
@@ -3,23 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-editor
.dirty-diff-modified-glyph
{
border-left
:
3px
solid
rgba
(
0
,
122
,
204
,
0.6
);
margin-left
:
5px
;
}
.monaco-editor.vs-dark
.dirty-diff-modified-glyph
{
border-left
:
3px
solid
rgba
(
0
,
188
,
242
,
0.6
);
margin-left
:
5px
;
}
.monaco-editor
.dirty-diff-added-glyph
{
border-left
:
3px
solid
rgba
(
45
,
136
,
62
,
0.6
);
margin-left
:
5px
;
}
.monaco-editor.vs-dark
.dirty-diff-added-glyph
{
border-left
:
3px
solid
rgba
(
127
,
186
,
0
,
0.6
);
.monaco-editor
.dirty-diff-modified-glyph
,
.monaco-editor
.dirty-diff-added-glyph
,
.monaco-editor
.dirty-diff-deleted-glyph
:after
{
margin-left
:
5px
;
}
...
...
@@ -27,11 +13,7 @@
content
:
''
;
position
:
absolute
;
bottom
:
-4px
;
margin-left
:
5px
;
box-sizing
:
border-box
;
border-left
:
4px
solid
rgba
(
185
,
19
,
26
,
0.76
);
border-top
:
4px
solid
transparent
;
border-bottom
:
4px
solid
transparent
;
width
:
4px
;
height
:
0
;
z-index
:
9
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录