Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
e6a82d5f
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,发现更多精彩内容 >>
提交
e6a82d5f
编写于
1月 26, 2017
作者:
C
Christof Marti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix vertical scrolling (fixes #18858)
上级
365869ce
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
66 addition
and
52 deletion
+66
-52
src/vs/workbench/parts/walkThrough/electron-browser/walkThroughPart.ts
...nch/parts/walkThrough/electron-browser/walkThroughPart.ts
+15
-7
src/vs/workbench/parts/welcomePage/electron-browser/welcomePage.css
...kbench/parts/welcomePage/electron-browser/welcomePage.css
+9
-5
src/vs/workbench/parts/welcomePage/electron-browser/welcomePage.html
...bench/parts/welcomePage/electron-browser/welcomePage.html
+42
-40
未找到文件。
src/vs/workbench/parts/walkThrough/electron-browser/walkThroughPart.ts
浏览文件 @
e6a82d5f
...
...
@@ -64,6 +64,7 @@ export class WalkThroughPart extends BaseEditor {
private
content
:
HTMLDivElement
;
private
scrollbar
:
DomScrollableElement
;
private
editorFocus
:
IContextKey
<
boolean
>
;
private
size
:
Dimension
;
constructor
(
@
ITelemetryService
telemetryService
:
ITelemetryService
,
...
...
@@ -170,13 +171,10 @@ export class WalkThroughPart extends BaseEditor {
return
uri
.
with
({
query
:
JSON
.
stringify
(
query
)
});
}
layout
({
width
,
height
}:
Dimension
):
void
{
$
(
this
.
content
).
style
({
height
:
`
${
height
}
px`
,
width
:
`
${
width
}
px`
});
const
innerContent
=
this
.
content
.
firstElementChild
;
if
(
innerContent
)
{
const
classList
=
innerContent
.
classList
;
classList
[
height
<=
690
?
'
add
'
:
'
remove
'
](
'
max-height-690px
'
);
}
layout
(
size
:
Dimension
):
void
{
this
.
size
=
size
;
$
(
this
.
content
).
style
({
height
:
`
${
size
.
height
}
px`
,
width
:
`
${
size
.
width
}
px`
});
this
.
updateSizeClasses
();
this
.
contentDisposables
.
forEach
(
disposable
=>
{
if
(
disposable
instanceof
CodeEditor
)
{
disposable
.
layout
();
...
...
@@ -185,6 +183,14 @@ export class WalkThroughPart extends BaseEditor {
this
.
scrollbar
.
scanDomNode
();
}
private
updateSizeClasses
()
{
const
innerContent
=
this
.
content
.
firstElementChild
;
if
(
this
.
size
&&
innerContent
)
{
const
classList
=
innerContent
.
classList
;
classList
[
this
.
size
.
height
<=
690
?
'
add
'
:
'
remove
'
](
'
max-height-690px
'
);
}
}
focus
():
void
{
let
active
=
document
.
activeElement
;
while
(
active
&&
active
!==
this
.
content
)
{
...
...
@@ -240,6 +246,7 @@ export class WalkThroughPart extends BaseEditor {
const
content
=
model
.
main
.
textEditorModel
.
getLinesContent
().
join
(
'
\n
'
);
if
(
strings
.
endsWith
(
input
.
getResource
().
path
,
'
.html
'
))
{
this
.
content
.
innerHTML
=
content
;
this
.
updateSizeClasses
();
this
.
decorateContent
();
if
(
input
.
onReady
)
{
input
.
onReady
(
this
.
content
.
firstElementChild
as
HTMLElement
);
...
...
@@ -316,6 +323,7 @@ export class WalkThroughPart extends BaseEditor {
});
}));
});
this
.
updateSizeClasses
();
if
(
input
.
onReady
)
{
input
.
onReady
(
innerContent
);
}
...
...
src/vs/workbench/parts/welcomePage/electron-browser/welcomePage.css
浏览文件 @
e6a82d5f
...
...
@@ -3,11 +3,15 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-workbench
>
.part.editor
>
.content
.welcomePageContainer
{
align-items
:
center
;
display
:
flex
;
justify-content
:
center
;
min-width
:
100%
;
min-height
:
100%
;
}
.monaco-workbench
>
.part.editor
>
.content
.welcomePage
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
width
:
90%
;
max-width
:
1200px
;
font-size
:
10px
;
...
...
@@ -241,7 +245,7 @@
outline-offset
:
-5px
;
}
.monaco-workbench
>
.part.editor
>
.content
.welcomePage.max-height-690px
.title
{
.monaco-workbench
>
.part.editor
>
.content
.welcomePage
Container
.max-height-690px
.title
{
display
:
none
;
}
...
...
src/vs/workbench/parts/welcomePage/electron-browser/welcomePage.html
浏览文件 @
e6a82d5f
<div
class=
"welcomePage"
>
<div
class=
"welcomePageContainer"
>
<div
class=
"welcomePage"
>
<div
class=
"title"
>
<h1>
Visual Studio Code
</h1>
<p
class=
"subtitle"
>
Editing evolved
</p>
...
...
@@ -44,4 +45,5 @@
</ul>
</div>
</div>
</div>
</div>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录