Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8c95810b
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,发现更多精彩内容 >>
提交
8c95810b
编写于
3月 23, 2017
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[theme] marker navigation widget
上级
ae97e9a9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
45 deletion
+43
-45
extensions/theme-abyss/themes/abyss-color-theme.json
extensions/theme-abyss/themes/abyss-color-theme.json
+3
-0
src/vs/editor/contrib/gotoError/browser/gotoError.css
src/vs/editor/contrib/gotoError/browser/gotoError.css
+0
-30
src/vs/editor/contrib/gotoError/browser/gotoError.ts
src/vs/editor/contrib/gotoError/browser/gotoError.ts
+40
-15
未找到文件。
extensions/theme-abyss/themes/abyss-color-theme.json
浏览文件 @
8c95810b
...
...
@@ -267,6 +267,9 @@
"editorPeekTitleBackground"
:
"#060621"
,
"editorPeekBorders"
:
"#7777cc"
,
"editorLineNumbers"
:
"#8686ff"
,
"editorMarkerNavigationBackground"
:
"#060621"
,
"editorMarkerNavigationError"
:
"#FF0000"
,
"editorMarkerNavigationWarning"
:
"#00FF00"
,
//
Workbench
Colors
"tabsContainerBackground"
:
"#1c1c2a"
,
...
...
src/vs/editor/contrib/gotoError/browser/gotoError.css
浏览文件 @
8c95810b
...
...
@@ -7,41 +7,11 @@
.monaco-editor
.marker-widget
{
padding-left
:
2px
;
background-color
:
white
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.monaco-editor
.zone-widget
.zone-widget-container.marker-error-widget
{
border-top-color
:
#ff5a5a
;
border-bottom-color
:
#ff5a5a
;
}
.monaco-editor
.zone-widget
.zone-widget-container.marker-warning-widget
{
border-top-color
:
#5aac5a
;
border-bottom-color
:
#5aac5a
;
}
.monaco-editor
.zone-widget-arrow.below.marker-error-widget
{
border-bottom-color
:
#ff5a5a
;
}
.monaco-editor
.zone-widget-arrow.below.marker-warning-widget
{
border-bottom-color
:
#5aac5a
;
}
.monaco-editor.vs-dark
.marker-widget
{
background-color
:
#2D2D30
;
}
/* High Contrast Theming */
.monaco-editor.hc-black
.marker-widget
{
background-color
:
#0C141F
;
}
.monaco-editor
.marker-widget
>
.stale
{
opacity
:
0.6
;
font-style
:
italic
;
...
...
src/vs/editor/contrib/gotoError/browser/gotoError.ts
浏览文件 @
8c95810b
...
...
@@ -24,6 +24,9 @@ import { editorAction, ServicesAccessor, IActionOptions, EditorAction, EditorCom
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
editorContribution
}
from
'
vs/editor/browser/editorBrowserExtensions
'
;
import
{
ZoneWidget
}
from
'
vs/editor/contrib/zoneWidget/browser/zoneWidget
'
;
import
{
registerColor
}
from
"
vs/platform/theme/common/colorRegistry
"
;
import
{
IThemeService
,
ITheme
}
from
"
vs/platform/theme/common/themeService
"
;
import
{
Color
}
from
"
vs/base/common/color
"
;
import
EditorContextKeys
=
editorCommon
.
EditorContextKeys
;
...
...
@@ -187,7 +190,7 @@ class MessageWidget {
container
.
appendChild
(
this
.
domNode
);
}
update
({
source
,
message
}:
IMarker
):
void
{
update
({
source
,
message
}:
IMarker
):
void
{
this
.
lines
=
1
;
if
(
source
)
{
const
indent
=
new
Array
(
source
.
length
+
3
+
1
).
join
(
'
'
);
...
...
@@ -207,13 +210,37 @@ class MarkerNavigationWidget extends ZoneWidget {
private
_title
:
HTMLElement
;
private
_message
:
MessageWidget
;
private
_callOnDispose
:
IDisposable
[]
=
[];
private
_severity
:
Severity
;
private
_backgroundColor
:
Color
;
constructor
(
editor
:
ICodeEditor
,
private
_model
:
MarkerModel
,
private
_commandService
:
ICommandService
)
{
constructor
(
editor
:
ICodeEditor
,
private
_model
:
MarkerModel
,
private
_commandService
:
ICommandService
,
private
_themeService
:
IThemeService
)
{
super
(
editor
,
{
showArrow
:
true
,
showFrame
:
true
,
isAccessible
:
true
});
this
.
_severity
=
Severity
.
Warning
;
this
.
_backgroundColor
=
Color
.
white
;
this
.
_applyTheme
(
_themeService
.
getTheme
());
this
.
_callOnDispose
.
push
(
_themeService
.
onThemeChange
(
this
.
_applyTheme
.
bind
(
this
)));
this
.
create
();
this
.
_wireModelAndView
();
}
private
_applyTheme
(
theme
:
ITheme
)
{
this
.
_backgroundColor
=
theme
.
getColor
(
editorMarkerNavigationBackground
);
let
frameColor
=
theme
.
getColor
(
this
.
_severity
===
Severity
.
Error
?
editorMarkerNavigationError
:
editorMarkerNavigationWarning
);
this
.
style
({
arrowColor
:
frameColor
,
frameColor
:
frameColor
});
// style() will trigger _applyStyles
}
protected
_applyStyles
()
{
if
(
this
.
_parentContainer
)
{
this
.
_parentContainer
.
style
.
backgroundColor
=
this
.
_backgroundColor
.
toString
();
}
super
.
_applyStyles
();
}
dispose
():
void
{
this
.
_callOnDispose
=
dispose
(
this
.
_callOnDispose
);
super
.
dispose
();
...
...
@@ -265,18 +292,9 @@ class MarkerNavigationWidget extends ZoneWidget {
this
.
_message
.
update
(
marker
);
this
.
_model
.
withoutWatchingEditorPosition
(()
=>
{
const
errorWidgetClass
=
'
marker-error-widget
'
,
warningWidgetClass
=
'
marker-warning-widget
'
;
// update frame color (only applied on 'show')
switch
(
marker
.
severity
)
{
case
Severity
.
Error
:
this
.
setCssClass
(
errorWidgetClass
,
warningWidgetClass
);
break
;
case
Severity
.
Warning
:
case
Severity
.
Info
:
this
.
setCssClass
(
warningWidgetClass
,
errorWidgetClass
);
break
;
}
this
.
_severity
=
marker
.
severity
;
this
.
_applyTheme
(
this
.
_themeService
.
getTheme
());
this
.
show
({
lineNumber
:
marker
.
startLineNumber
,
...
...
@@ -354,7 +372,8 @@ class MarkerController implements editorCommon.IEditorContribution {
editor
:
ICodeEditor
,
@
IMarkerService
private
_markerService
:
IMarkerService
,
@
IContextKeyService
private
_contextKeyService
:
IContextKeyService
,
@
ICommandService
private
_commandService
:
ICommandService
@
ICommandService
private
_commandService
:
ICommandService
,
@
IThemeService
private
_themeService
:
IThemeService
)
{
this
.
_editor
=
editor
;
this
.
_markersNavigationVisible
=
CONTEXT_MARKERS_NAVIGATION_VISIBLE
.
bindTo
(
this
.
_contextKeyService
);
...
...
@@ -383,7 +402,7 @@ class MarkerController implements editorCommon.IEditorContribution {
const
markers
=
this
.
_getMarkers
();
this
.
_model
=
new
MarkerModel
(
this
.
_editor
,
markers
);
this
.
_zone
=
new
MarkerNavigationWidget
(
this
.
_editor
,
this
.
_model
,
this
.
_commandService
);
this
.
_zone
=
new
MarkerNavigationWidget
(
this
.
_editor
,
this
.
_model
,
this
.
_commandService
,
this
.
_themeService
);
this
.
_markersNavigationVisible
.
set
(
true
);
this
.
_callOnClose
.
push
(
this
.
_model
);
...
...
@@ -459,3 +478,9 @@ CommonEditorRegistry.registerEditorCommand(new MarkerCommand({
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
}));
// theming
export
const
editorMarkerNavigationError
=
registerColor
(
'
editorMarkerNavigationError
'
,
{
dark
:
'
#ff5a5a
'
,
light
:
'
#ff5a5a
'
,
hc
:
'
#ff5a5a
'
},
nls
.
localize
(
'
editorMarkerNavigationError
'
,
'
Editor marker navigation widget error color
'
));
export
const
editorMarkerNavigationWarning
=
registerColor
(
'
editorMarkerNavigationWarning
'
,
{
dark
:
'
#5aac5a
'
,
light
:
'
#5aac5a
'
,
hc
:
'
#5aac5a
'
},
nls
.
localize
(
'
editorMarkerNavigationWarning
'
,
'
Editor marker navigation widget warning color
'
));
export
const
editorMarkerNavigationBackground
=
registerColor
(
'
editorMarkerNavigationBackground
'
,
{
dark
:
'
#2D2D30
'
,
light
:
Color
.
white
,
hc
:
'
#0C141F
'
},
nls
.
localize
(
'
editorMarkerNavigationBackground
'
,
'
Editor marker navigation widget background
'
));
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录