Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5c77e1ac
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,发现更多精彩内容 >>
提交
5c77e1ac
编写于
9月 09, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pimp up suggest styles
related to #2330
上级
bba1f520
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
47 addition
and
38 deletion
+47
-38
src/vs/editor/contrib/suggest/browser/suggest.css
src/vs/editor/contrib/suggest/browser/suggest.css
+27
-25
src/vs/editor/contrib/suggest/browser/suggestWidget.ts
src/vs/editor/contrib/suggest/browser/suggestWidget.ts
+20
-13
未找到文件。
src/vs/editor/contrib/suggest/browser/suggest.css
浏览文件 @
5c77e1ac
...
...
@@ -24,10 +24,6 @@
background-image
:
url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjU3NSIgaGVpZ2h0PSI2cHgiPg0KICA8c3R5bGU+DQogICAgY2lyY2xlIHsNCiAgICAgIGFuaW1hdGlvbjogYmFsbCAyLjVzIGN1YmljLWJlemllcigwLjAwMCwgMS4wMDAsIDEuMDAwLCAwLjAwMCkgaW5maW5pdGU7DQogICAgICBmaWxsOiAjYmJiOw0KIC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WQ9ImNpcmNsZTQiIGN4PSItMTYwIiBjeT0iMyIgcj0iMyIgLz4NCiAgICA8Y2lyY2xlIGNsYXNzPSJjaXJjbGUiIGlkPSJjaXJjbGU1IiBjeD0iLTE3NSIgY3k9IjMiIHI9IjMiIC8+DQogIDwvZz4NCjwvc3ZnPg==')
;
}
.monaco-editor.mac
.suggest-widget
.text
{
line-height
:
1.3em
;
}
.monaco-editor
.suggest-widget
>
.message
{
padding-left
:
22px
;
opacity
:
0.7
;
...
...
@@ -42,7 +38,7 @@
-mox-box-sizing
:
border-box
;
box-sizing
:
border-box
;
line-height
:
1.2em
;
padding
:
2px
10px
2px
22px
;
padding
:
0
10px
0
22px
;
background-repeat
:
no-repeat
;
background-position
:
2px
2px
;
white-space
:
nowrap
;
...
...
@@ -67,6 +63,7 @@
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
opacity
:
0.85
;
}
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
.docs
>
.docs-details
{
...
...
@@ -87,16 +84,7 @@
opacity
:
1
;
}
.monaco-editor
.suggest-widget
.details
>
.monaco-scrollable-element
>
.body
>
.docs
,
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
.docs
{
color
:
#A21B1B
;
}
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
.monaco-highlighted-label
>
span
{
opacity
:
1
;
}
.monaco-editor
.suggest-widget
:not
(
.frozen
)
.monaco-list
.monaco-list-row
.monaco-highlighted-label
.highlight
{
.monaco-editor
.suggest-widget
:not
(
.frozen
)
.monaco-highlighted-label
.highlight
{
font-weight
:
bold
;
color
:
#186B9E
;
}
...
...
@@ -173,14 +161,15 @@
.monaco-editor
.suggest-widget
.details
{
height
:
100%
;
box-sizing
:
border-box
;
padding
:
0
10px
;
display
:
flex
;
flex-direction
:
column
;
}
.monaco-editor
.suggest-widget
.details
>
.header
{
padding
-top
:
2
px
;
padding
:
4px
5
px
;
display
:
flex
;
height
:
20px
;
box-sizing
:
border-box
;
border-bottom
:
1px
solid
rgba
(
204
,
204
,
204
,
0.5
);
}
.monaco-editor
.suggest-widget
.details
>
.header
>
.title
{
...
...
@@ -201,15 +190,27 @@
}
.monaco-editor
.suggest-widget
.details
>
.monaco-scrollable-element
{
height
:
calc
(
100%
-
20px
)
;
flex
:
1
;
}
.monaco-editor
.suggest-widget
.details
>
.monaco-scrollable-element
>
.body
{
position
:
absolute
;
box-sizing
:
border-box
;
height
:
100%
;
width
:
100%
;
}
.monaco-editor
.suggest-widget
.details
>
.monaco-scrollable-element
>
.body
>
.type
{
opacity
:
0.7
;
}
.monaco-editor
.suggest-widget
.details
>
.monaco-scrollable-element
>
.body
>
p
{
margin
:
0
;
padding
:
4px
5px
;
}
.monaco-editor
.suggest-widget
.details
>
.monaco-scrollable-element
>
.body
>
p
:not
(
:first-child
)
{
border-top
:
1px
solid
rgba
(
204
,
204
,
204
,
0.5
);
}
/* Dark theme */
...
...
@@ -218,13 +219,14 @@
border
:
1px
solid
rgb
(
69
,
69
,
69
);
}
.monaco-editor.vs-dark
.suggest-widget
:not
(
.frozen
)
.monaco-list
.monaco-list-row
.monaco-highlighted-label
.highlight
{
color
:
#219AE4
;
.monaco-editor.vs-dark
.suggest-widget
.details
>
.header
,
.monaco-editor.vs-dark
.suggest-widget
.details
>
.monaco-scrollable-element
>
.body
>
p
{
border-color
:
rgba
(
85
,
85
,
85
,
0.5
);
}
.monaco-editor.vs-dark
.suggest-widget
.details
>
.monaco-scrollable-element
>
.body
>
.docs
,
.monaco-editor.vs-dark
.suggest-widget
.monaco-list
.monaco-list-row
.docs
{
color
:
#C07A7A
;
.monaco-editor.vs-dark
.suggest-widget
:not
(
.frozen
)
.monaco-highlighted-label
.highlight
{
color
:
#219AE4
;
}
...
...
@@ -262,7 +264,7 @@
border
:
2px
solid
#6FC3DF
;
}
.monaco-editor.hc-black
.suggest-widget
:not
(
.frozen
)
.monaco-
list
.monaco-list-row
.monaco-
highlighted-label
.highlight
{
.monaco-editor.hc-black
.suggest-widget
:not
(
.frozen
)
.monaco-highlighted-label
.highlight
{
color
:
#219AE4
;
}
...
...
src/vs/editor/contrib/suggest/browser/suggestWidget.ts
浏览文件 @
5c77e1ac
...
...
@@ -64,6 +64,8 @@ class Renderer implements IRenderer<ICompletionItem, ISuggestionTemplateData> {
const
data
=
<
ISuggestionTemplateData
>
Object
.
create
(
null
);
data
.
disposables
=
[];
data
.
root
=
container
;
data
.
root
.
style
.
lineHeight
=
`
${
UnfocusedHeight
}
px`
;
data
.
icon
=
append
(
container
,
$
(
'
.icon
'
));
data
.
colorspan
=
append
(
data
.
icon
,
$
(
'
span.colorspan
'
));
...
...
@@ -113,8 +115,8 @@ class Renderer implements IRenderer<ICompletionItem, ISuggestionTemplateData> {
}
}
data
.
highlightedLabel
.
set
(
suggestion
.
label
,
(
<
ICompletionItem
>
element
)
.
highlights
);
data
.
typeLabel
.
innerTex
t
=
(
suggestion
.
detail
||
''
).
replace
(
/
\n
.*$/m
,
''
);
data
.
highlightedLabel
.
set
(
suggestion
.
label
,
element
.
highlights
);
data
.
typeLabel
.
textConten
t
=
(
suggestion
.
detail
||
''
).
replace
(
/
\n
.*$/m
,
''
);
data
.
documentation
.
textContent
=
suggestion
.
documentation
||
''
;
...
...
@@ -177,6 +179,7 @@ class SuggestionDetails {
private
el
:
HTMLElement
;
private
title
:
HTMLElement
;
private
titleLabel
:
HighlightedLabel
;
private
back
:
HTMLElement
;
private
scrollbar
:
DomScrollableElement
;
private
body
:
HTMLElement
;
...
...
@@ -197,6 +200,9 @@ class SuggestionDetails {
const
header
=
append
(
this
.
el
,
$
(
'
.header
'
));
this
.
title
=
append
(
header
,
$
(
'
span.title
'
));
this
.
titleLabel
=
new
HighlightedLabel
(
this
.
title
);
this
.
disposables
.
push
(
this
.
titleLabel
);
this
.
back
=
append
(
header
,
$
(
'
span.go-back
'
));
this
.
back
.
title
=
nls
.
localize
(
'
goback
'
,
"
Go back
"
);
this
.
body
=
$
(
'
.body
'
);
...
...
@@ -211,11 +217,8 @@ class SuggestionDetails {
this
.
configureFont
();
this
.
disposables
.
push
(
this
.
editor
.
onDidChangeConfiguration
((
e
:
IConfigurationChangedEvent
)
=>
{
if
(
e
.
fontInfo
)
{
this
.
configureFont
();
}
}));
const
onFontInfo
=
filterEvent
(
this
.
editor
.
onDidChangeConfiguration
.
bind
(
this
.
editor
),
(
e
:
IConfigurationChangedEvent
)
=>
e
.
fontInfo
);
onFontInfo
(
this
.
configureFont
,
this
,
this
.
disposables
);
}
get
element
()
{
...
...
@@ -224,16 +227,16 @@ class SuggestionDetails {
render
(
item
:
ICompletionItem
):
void
{
if
(
!
item
)
{
this
.
title
.
textContent
=
''
;
this
.
title
Label
.
set
(
''
)
;
this
.
type
.
textContent
=
''
;
this
.
docs
.
textContent
=
''
;
this
.
ariaLabel
=
null
;
return
;
}
this
.
title
.
innerText
=
item
.
suggestion
.
label
;
this
.
type
.
innerTex
t
=
item
.
suggestion
.
detail
||
''
;
this
.
docs
.
innerTex
t
=
item
.
suggestion
.
documentation
;
this
.
title
Label
.
set
(
item
.
suggestion
.
label
,
item
.
highlights
)
;
this
.
type
.
textConten
t
=
item
.
suggestion
.
detail
||
''
;
this
.
docs
.
textConten
t
=
item
.
suggestion
.
documentation
;
this
.
back
.
onmousedown
=
e
=>
{
e
.
preventDefault
();
e
.
stopPropagation
();
...
...
@@ -271,8 +274,12 @@ class SuggestionDetails {
private
configureFont
()
{
const
fontInfo
=
this
.
editor
.
getConfiguration
().
fontInfo
;
const
fontSize
=
`
${
fontInfo
.
fontSize
}
px`
;
this
.
title
.
style
.
fontFamily
=
fontInfo
.
fontFamily
;
this
.
title
.
style
.
fontSize
=
fontSize
;
this
.
type
.
style
.
fontFamily
=
fontInfo
.
fontFamily
;
this
.
type
.
style
.
fontSize
=
fontSize
;
}
dispose
():
void
{
...
...
@@ -489,12 +496,12 @@ export class SuggestWidget implements IContentWidget, IDisposable {
}
break
;
case
State
.
Loading
:
this
.
messageElement
.
innerTex
t
=
SuggestWidget
.
LOADING_MESSAGE
;
this
.
messageElement
.
textConten
t
=
SuggestWidget
.
LOADING_MESSAGE
;
hide
(
this
.
listElement
,
this
.
details
.
element
);
this
.
show
();
break
;
case
State
.
Empty
:
this
.
messageElement
.
innerTex
t
=
SuggestWidget
.
NO_SUGGESTIONS_MESSAGE
;
this
.
messageElement
.
textConten
t
=
SuggestWidget
.
NO_SUGGESTIONS_MESSAGE
;
hide
(
this
.
listElement
,
this
.
details
.
element
);
show
(
this
.
messageElement
);
this
.
show
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录