Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
e0a8ca57
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,发现更多精彩内容 >>
提交
e0a8ca57
编写于
5月 17, 2017
作者:
R
Ramya Achutha Rao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Re-ordering css for better readability
上级
0b48b8c1
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
49 addition
and
41 deletion
+49
-41
src/vs/editor/contrib/suggest/browser/media/suggest.css
src/vs/editor/contrib/suggest/browser/media/suggest.css
+38
-30
src/vs/editor/contrib/suggest/browser/suggestWidget.ts
src/vs/editor/contrib/suggest/browser/suggestWidget.ts
+11
-11
未找到文件。
src/vs/editor/contrib/suggest/browser/media/suggest.css
浏览文件 @
e0a8ca57
...
...
@@ -6,36 +6,13 @@
/* Suggest */
.monaco-editor
.suggest-widget
{
z-index
:
40
;
width
:
430px
;
}
.monaco-editor
.suggest-widget.docs-expanded
{
width
:
660px
;
}
.monaco-editor
.suggest-widget.docs-expanded
>
.tree
{
width
:
330px
;
}
.monaco-editor
.suggest-widget
>
.details
{
/* .details does not use border-box, so subtract the border height here (2px). This is the case
because the height of .details is set prorammatically based on .header and .docs, we don't want
our JS to care about the size of the border (which changes based on theme type). */
width
:
328px
;
}
.monaco-editor
.suggest-widget
>
.details
,
.monaco-editor
.suggest-widget
>
.tree
{
border-style
:
solid
;
border-width
:
1px
;
}
.monaco-editor
.suggest-widget
,
.monaco-editor
.suggest-widget
>
.tree
,
.monaco-editor
.suggest-widget.small.docs-expanded
>
.tree
,
.monaco-editor
.suggest-widget.small
>
.details
{
width
:
430px
;
}
.monaco-editor
.suggest-widget.visible
{
-webkit-transition
:
left
.05s
ease-in-out
;
-moz-transition
:
left
.05s
ease-in-out
;
...
...
@@ -49,10 +26,14 @@
border-width
:
1px
;
}
/** Styles for the list element **/
.monaco-editor
.suggest-widget
>
.tree
{
height
:
100%
;
width
:
430px
;
float
:
left
;
box-sizing
:
border-box
;
border-style
:
solid
;
border-width
:
1px
;
}
.monaco-editor
.suggest-widget.list-right
>
.tree
{
...
...
@@ -63,6 +44,16 @@
float
:
none
;
}
.monaco-editor
.suggest-widget.docs-expanded
>
.tree
{
width
:
330px
;
}
.monaco-editor
.suggest-widget.small.docs-expanded
>
.tree
{
width
:
430px
;
}
/** Styles for each row in the list element **/
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
{
display
:
flex
;
-mox-box-sizing
:
border-box
;
...
...
@@ -90,8 +81,10 @@
font-weight
:
bold
;
}
/** Icon styles **/
.monaco-editor
.suggest-widget
.details
>
.monaco-scrollable-element
>
.body
>
.close
,
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.
docs-details
{
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.
readMore
{
opacity
:
0.6
;
background-position
:
center
center
;
background-repeat
:
no-repeat
;
...
...
@@ -104,15 +97,17 @@
float
:
right
;
}
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.
docs-details
{
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.
readMore
{
background-image
:
url('./info.svg')
;
}
.monaco-editor
.suggest-widget
.details
>
.monaco-scrollable-element
>
.body
>
.close
:hover
,
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.
docs-details
:hover
{
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.
readMore
:hover
{
opacity
:
1
;
}
/** Type Info and icon next to the label in the focused completion item **/
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.type-label
{
margin-left
:
0.8em
;
flex
:
1
;
...
...
@@ -126,19 +121,21 @@
display
:
inline
;
}
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.
docs-details
,
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.
readMore
,
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.type-label
,
.monaco-editor
.suggest-widget.docs-expanded
.monaco-list
.monaco-list-row.focused
>
.contents
>
.main
>
.
docs-details
,
.monaco-editor
.suggest-widget.docs-expanded
.monaco-list
.monaco-list-row.focused
>
.contents
>
.main
>
.
readMore
,
.monaco-editor
.suggest-widget.docs-expanded
.monaco-list
.monaco-list-row.focused
>
.contents
>
.main
>
.type-label
{
display
:
none
;
}
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row.focused
>
.contents
>
.main
>
.
docs-details
,
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row.focused
>
.contents
>
.main
>
.
readMore
,
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row.focused
>
.contents
>
.main
>
.type-label
,
.monaco-editor
.suggest-widget.docs-expanded.small
.monaco-list
.monaco-list-row.focused
>
.contents
>
.main
>
.type-label
{
display
:
inline
;
}
/** Styles for each row in the list **/
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
.icon
{
display
:
block
;
height
:
16px
;
...
...
@@ -184,11 +181,22 @@
display
:
inline-block
;
}
/** Styles for the docs of the completion item in focus **/
.monaco-editor
.suggest-widget
.details
{
max-height
:
216px
;
display
:
flex
;
flex-direction
:
column
;
cursor
:
default
;
/* .details does not use border-box, so subtract the border height here (2px). This is the case
because the height of .details is set prorammatically based on .header and .docs, we don't want
our JS to care about the size of the border (which changes based on theme type). */
width
:
328px
;
border-style
:
solid
;
border-width
:
1px
;
}
.monaco-editor
.suggest-widget.small
>
.details
{
width
:
430px
;
}
.monaco-editor
.suggest-widget
.details.no-docs
{
...
...
src/vs/editor/contrib/suggest/browser/suggestWidget.ts
浏览文件 @
e0a8ca57
...
...
@@ -40,7 +40,7 @@ interface ISuggestionTemplateData {
colorspan
:
HTMLElement
;
highlightedLabel
:
HighlightedLabel
;
typeLabel
:
HTMLElement
;
documentationDetails
:
HTMLElement
;
readMore
:
HTMLElement
;
disposables
:
IDisposable
[];
}
...
...
@@ -95,8 +95,8 @@ class Renderer implements IRenderer<ICompletionItem, ISuggestionTemplateData> {
data
.
disposables
.
push
(
data
.
highlightedLabel
);
data
.
typeLabel
=
append
(
main
,
$
(
'
span.type-label
'
));
data
.
documentationDetails
=
append
(
main
,
$
(
'
span.docs-details
'
));
data
.
documentationDetails
.
title
=
nls
.
localize
(
'
readMore
'
,
"
Read More...{0}
"
,
this
.
triggerKeybindingLabel
);
data
.
readMore
=
append
(
main
,
$
(
'
span.readMore
'
));
data
.
readMore
.
title
=
nls
.
localize
(
'
readMore
'
,
"
Read More...{0}
"
,
this
.
triggerKeybindingLabel
);
const
configureFont
=
()
=>
{
const
configuration
=
this
.
editor
.
getConfiguration
();
...
...
@@ -111,8 +111,8 @@ class Renderer implements IRenderer<ICompletionItem, ISuggestionTemplateData> {
main
.
style
.
lineHeight
=
lineHeightPx
;
data
.
icon
.
style
.
height
=
lineHeightPx
;
data
.
icon
.
style
.
width
=
lineHeightPx
;
data
.
documentationDetails
.
style
.
height
=
lineHeightPx
;
data
.
documentationDetails
.
style
.
width
=
lineHeightPx
;
data
.
readMore
.
style
.
height
=
lineHeightPx
;
data
.
readMore
.
style
.
width
=
lineHeightPx
;
};
configureFont
();
...
...
@@ -149,20 +149,20 @@ class Renderer implements IRenderer<ICompletionItem, ISuggestionTemplateData> {
data
.
typeLabel
.
textContent
=
(
suggestion
.
detail
||
''
).
replace
(
/
\n
.*$/m
,
''
);
if
(
canExpandCompletionItem
(
element
))
{
show
(
data
.
documentationDetails
);
data
.
documentationDetails
.
onmousedown
=
e
=>
{
show
(
data
.
readMore
);
data
.
readMore
.
onmousedown
=
e
=>
{
e
.
stopPropagation
();
e
.
preventDefault
();
};
data
.
documentationDetails
.
onclick
=
e
=>
{
data
.
readMore
.
onclick
=
e
=>
{
e
.
stopPropagation
();
e
.
preventDefault
();
this
.
widget
.
toggleDetails
();
};
}
else
{
hide
(
data
.
documentationDetails
);
data
.
documentationDetails
.
onmousedown
=
null
;
data
.
documentationDetails
.
onclick
=
null
;
hide
(
data
.
readMore
);
data
.
readMore
.
onmousedown
=
null
;
data
.
readMore
.
onclick
=
null
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录