Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8021f0f4
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,发现更多精彩内容 >>
提交
8021f0f4
编写于
9月 12, 2018
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Simplify usage of IModelDecorationOverviewRulerOptions
上级
eb4161ee
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
8 addition
and
39 deletion
+8
-39
src/vs/editor/common/model.ts
src/vs/editor/common/model.ts
+1
-6
src/vs/editor/common/model/textModel.ts
src/vs/editor/common/model/textModel.ts
+5
-7
src/vs/editor/common/services/modelServiceImpl.ts
src/vs/editor/common/services/modelServiceImpl.ts
+0
-5
src/vs/editor/common/viewModel/splitLinesCollection.ts
src/vs/editor/common/viewModel/splitLinesCollection.ts
+1
-1
src/vs/editor/contrib/bracketMatching/bracketMatching.ts
src/vs/editor/contrib/bracketMatching/bracketMatching.ts
+0
-1
src/vs/editor/contrib/find/findDecorations.ts
src/vs/editor/contrib/find/findDecorations.ts
+0
-3
src/vs/editor/contrib/multicursor/multicursor.ts
src/vs/editor/contrib/multicursor/multicursor.ts
+0
-1
src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts
src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts
+0
-3
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+1
-6
src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts
...arts/preferences/browser/keybindingsEditorContribution.ts
+0
-1
src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts
src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts
+0
-1
src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts
...vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts
+0
-1
src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts
...orkbench/parts/scm/electron-browser/dirtydiffDecorator.ts
+0
-1
src/vs/workbench/parts/search/common/searchModel.ts
src/vs/workbench/parts/search/common/searchModel.ts
+0
-2
未找到文件。
src/vs/editor/common/model.ts
浏览文件 @
8021f0f4
...
...
@@ -40,12 +40,7 @@ export interface IModelDecorationOverviewRulerOptions {
* CSS color to render in the overview ruler.
* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
*/
darkColor
:
string
|
ThemeColor
;
/**
* CSS color to render in the overview ruler.
* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
*/
hcColor
?:
string
|
ThemeColor
;
darkColor
?:
string
|
ThemeColor
;
/**
* The position in the overview ruler.
*/
...
...
src/vs/editor/common/model/textModel.ts
浏览文件 @
8021f0f4
...
...
@@ -2783,30 +2783,28 @@ function cleanClassName(className: string): string {
export
class
ModelDecorationOverviewRulerOptions
implements
model
.
IModelDecorationOverviewRulerOptions
{
readonly
color
:
string
|
ThemeColor
;
readonly
darkColor
:
string
|
ThemeColor
;
readonly
hcColor
:
string
|
ThemeColor
;
readonly
position
:
model
.
OverviewRulerLane
;
_resolvedColor
:
string
;
constructor
(
options
:
model
.
IModelDecorationOverviewRulerOptions
)
{
this
.
color
=
strings
.
empty
;
this
.
darkColor
=
strings
.
empty
;
this
.
hcColor
=
strings
.
empty
;
this
.
position
=
model
.
OverviewRulerLane
.
Center
;
this
.
_resolvedColor
=
null
;
if
(
options
&&
options
.
color
)
{
this
.
color
=
options
.
color
;
if
(
typeof
options
.
color
!==
'
string
'
)
{
this
.
darkColor
=
options
.
color
;
}
}
if
(
options
&&
options
.
darkColor
)
{
this
.
darkColor
=
options
.
darkColor
;
this
.
hcColor
=
options
.
darkColor
;
}
if
(
options
&&
options
.
hcColor
)
{
this
.
hcColor
=
options
.
hcColor
;
}
if
(
options
&&
options
.
hasOwnProperty
(
'
position
'
)
)
{
if
(
options
&&
typeof
options
.
position
===
'
number
'
)
{
this
.
position
=
options
.
position
;
}
// console.log(this);
}
}
...
...
src/vs/editor/common/services/modelServiceImpl.ts
浏览文件 @
8021f0f4
...
...
@@ -129,7 +129,6 @@ class ModelMarkerHandler {
let
className
:
string
;
let
color
:
ThemeColor
;
let
darkColor
:
ThemeColor
;
let
zIndex
:
number
;
let
inlineClassName
:
string
;
...
...
@@ -145,20 +144,17 @@ class ModelMarkerHandler {
case
MarkerSeverity
.
Warning
:
className
=
ClassName
.
EditorWarningDecoration
;
color
=
themeColorFromId
(
overviewRulerWarning
);
darkColor
=
themeColorFromId
(
overviewRulerWarning
);
zIndex
=
20
;
break
;
case
MarkerSeverity
.
Info
:
className
=
ClassName
.
EditorInfoDecoration
;
color
=
themeColorFromId
(
overviewRulerInfo
);
darkColor
=
themeColorFromId
(
overviewRulerInfo
);
zIndex
=
10
;
break
;
case
MarkerSeverity
.
Error
:
default
:
className
=
ClassName
.
EditorErrorDecoration
;
color
=
themeColorFromId
(
overviewRulerError
);
darkColor
=
themeColorFromId
(
overviewRulerError
);
zIndex
=
30
;
break
;
}
...
...
@@ -205,7 +201,6 @@ class ModelMarkerHandler {
showIfCollapsed
:
true
,
overviewRuler
:
{
color
,
darkColor
,
position
:
OverviewRulerLane
.
Right
},
zIndex
,
...
...
src/vs/editor/common/viewModel/splitLinesCollection.ts
浏览文件 @
8021f0f4
...
...
@@ -1407,7 +1407,7 @@ class OverviewRulerDecorations {
function
resolveColor
(
opts
:
ModelDecorationOverviewRulerOptions
,
theme
:
ITheme
):
string
{
if
(
!
opts
.
_resolvedColor
)
{
const
themeType
=
theme
.
type
;
const
color
=
(
themeType
===
'
dark
'
?
opts
.
darkColor
:
themeType
===
'
light
'
?
opts
.
color
:
opts
.
hc
Color
);
const
color
=
(
themeType
===
'
light
'
?
opts
.
color
:
opts
.
dark
Color
);
opts
.
_resolvedColor
=
resolveRulerColor
(
color
,
theme
);
}
return
opts
.
_resolvedColor
;
...
...
src/vs/editor/contrib/bracketMatching/bracketMatching.ts
浏览文件 @
8021f0f4
...
...
@@ -234,7 +234,6 @@ export class BracketMatchingController extends Disposable implements editorCommo
className
:
'
bracket-match
'
,
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerBracketMatchForeground
),
darkColor
:
themeColorFromId
(
overviewRulerBracketMatchForeground
),
position
:
OverviewRulerLane
.
Center
}
});
...
...
src/vs/editor/contrib/find/findDecorations.ts
浏览文件 @
8021f0f4
...
...
@@ -272,7 +272,6 @@ export class FindDecorations implements IDisposable {
showIfCollapsed
:
true
,
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerFindMatchForeground
),
darkColor
:
themeColorFromId
(
overviewRulerFindMatchForeground
),
position
:
OverviewRulerLane
.
Center
}
});
...
...
@@ -283,7 +282,6 @@ export class FindDecorations implements IDisposable {
showIfCollapsed
:
true
,
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerFindMatchForeground
),
darkColor
:
themeColorFromId
(
overviewRulerFindMatchForeground
),
position
:
OverviewRulerLane
.
Center
}
});
...
...
@@ -298,7 +296,6 @@ export class FindDecorations implements IDisposable {
stickiness
:
TrackedRangeStickiness
.
NeverGrowsWhenTypingAtEdges
,
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerFindMatchForeground
),
darkColor
:
themeColorFromId
(
overviewRulerFindMatchForeground
),
position
:
OverviewRulerLane
.
Center
}
});
...
...
src/vs/editor/contrib/multicursor/multicursor.ts
浏览文件 @
8021f0f4
...
...
@@ -897,7 +897,6 @@ export class SelectionHighlighter extends Disposable implements IEditorContribut
className
:
'
selectionHighlight
'
,
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerSelectionHighlightForeground
),
darkColor
:
themeColorFromId
(
overviewRulerSelectionHighlightForeground
),
position
:
OverviewRulerLane
.
Center
}
});
...
...
src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts
浏览文件 @
8021f0f4
...
...
@@ -433,7 +433,6 @@ class WordHighlighter {
className
:
'
wordHighlightStrong
'
,
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerWordHighlightStrongForeground
),
darkColor
:
themeColorFromId
(
overviewRulerWordHighlightStrongForeground
),
position
:
OverviewRulerLane
.
Center
}
});
...
...
@@ -443,7 +442,6 @@ class WordHighlighter {
className
:
'
selectionHighlight
'
,
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerSelectionHighlightForeground
),
darkColor
:
themeColorFromId
(
overviewRulerSelectionHighlightForeground
),
position
:
OverviewRulerLane
.
Center
}
});
...
...
@@ -453,7 +451,6 @@ class WordHighlighter {
className
:
'
wordHighlight
'
,
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerWordHighlightForeground
),
darkColor
:
themeColorFromId
(
overviewRulerWordHighlightForeground
),
position
:
OverviewRulerLane
.
Center
}
});
...
...
src/vs/monaco.d.ts
浏览文件 @
8021f0f4
...
...
@@ -1187,12 +1187,7 @@ declare namespace monaco.editor {
* CSS color to render in the overview ruler.
* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
*/
darkColor
:
string
|
ThemeColor
;
/**
* CSS color to render in the overview ruler.
* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
*/
hcColor
?:
string
|
ThemeColor
;
darkColor
?:
string
|
ThemeColor
;
/**
* The position in the overview ruler.
*/
...
...
src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts
浏览文件 @
8021f0f4
...
...
@@ -352,7 +352,6 @@ export class KeybindingEditorDecorationsRenderer extends Disposable {
hoverMessage
:
msg
,
overviewRuler
:
{
color
:
overviewRulerColor
,
darkColor
:
overviewRulerColor
,
position
:
OverviewRulerLane
.
Right
}
}
...
...
src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts
浏览文件 @
8021f0f4
...
...
@@ -262,7 +262,6 @@ export class GotoLineHandler extends QuickOpenHandler {
options
:
{
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerRangeHighlight
),
darkColor
:
themeColorFromId
(
overviewRulerRangeHighlight
),
position
:
OverviewRulerLane
.
Full
}
}
...
...
src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts
浏览文件 @
8021f0f4
...
...
@@ -531,7 +531,6 @@ export class GotoSymbolHandler extends QuickOpenHandler {
options
:
{
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerRangeHighlight
),
darkColor
:
themeColorFromId
(
overviewRulerRangeHighlight
),
position
:
OverviewRulerLane
.
Full
}
}
...
...
src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts
浏览文件 @
8021f0f4
...
...
@@ -808,7 +808,6 @@ class DirtyDiffDecorator {
if
(
options
.
overview
)
{
decorationOptions
.
overviewRuler
=
{
color
:
themeColorFromId
(
foregroundColor
),
darkColor
:
themeColorFromId
(
foregroundColor
),
position
:
OverviewRulerLane
.
Left
};
}
...
...
src/vs/workbench/parts/search/common/searchModel.ts
浏览文件 @
8021f0f4
...
...
@@ -116,7 +116,6 @@ export class FileMatch extends Disposable {
className
:
'
currentFindMatch
'
,
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerFindMatchForeground
),
darkColor
:
themeColorFromId
(
overviewRulerFindMatchForeground
),
position
:
OverviewRulerLane
.
Center
}
});
...
...
@@ -126,7 +125,6 @@ export class FileMatch extends Disposable {
className
:
'
findMatch
'
,
overviewRuler
:
{
color
:
themeColorFromId
(
overviewRulerFindMatchForeground
),
darkColor
:
themeColorFromId
(
overviewRulerFindMatchForeground
),
position
:
OverviewRulerLane
.
Center
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录