Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fede3435
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,发现更多精彩内容 >>
提交
fede3435
编写于
3月 02, 2018
作者:
D
Daniel Imms
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Put .split-view-view's into a container
Fixes #44435
上级
3add0988
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
40 deletion
+22
-40
src/vs/base/browser/ui/splitview/splitview.css
src/vs/base/browser/ui/splitview/splitview.css
+8
-3
src/vs/base/browser/ui/splitview/splitview.ts
src/vs/base/browser/ui/splitview/splitview.ts
+10
-5
src/vs/workbench/parts/terminal/electron-browser/media/terminal.css
...kbench/parts/terminal/electron-browser/media/terminal.css
+4
-4
src/vs/workbench/parts/terminal/electron-browser/terminalTab.ts
.../workbench/parts/terminal/electron-browser/terminalTab.ts
+0
-28
未找到文件。
src/vs/base/browser/ui/splitview/splitview.css
浏览文件 @
fede3435
...
...
@@ -10,15 +10,20 @@
height
:
100%
;
}
.monaco-split-view2
>
.split-view-view
{
.monaco-split-view2
>
.split-view-container
{
width
:
100%
;
height
:
100%
;
}
.monaco-split-view2
>
.split-view-container
>
.split-view-view
{
overflow
:
hidden
;
}
.monaco-split-view2.vertical
>
.split-view-view
{
.monaco-split-view2.vertical
>
.split-view-
container
>
.split-view-
view
{
width
:
100%
;
}
.monaco-split-view2.horizontal
>
.split-view-view
{
.monaco-split-view2.horizontal
>
.split-view-
container
>
.split-view-
view
{
height
:
100%
;
display
:
inline-block
;
}
src/vs/base/browser/ui/splitview/splitview.ts
浏览文件 @
fede3435
...
...
@@ -82,6 +82,7 @@ export class SplitView implements IDisposable {
private
orientation
:
Orientation
;
private
el
:
HTMLElement
;
private
viewContainer
:
HTMLElement
;
private
size
=
0
;
private
contentSize
=
0
;
private
viewItems
:
IViewItem
[]
=
[];
...
...
@@ -105,6 +106,10 @@ export class SplitView implements IDisposable {
dom
.
addClass
(
this
.
el
,
'
monaco-split-view2
'
);
dom
.
addClass
(
this
.
el
,
this
.
orientation
===
Orientation
.
VERTICAL
?
'
vertical
'
:
'
horizontal
'
);
container
.
appendChild
(
this
.
el
);
this
.
viewContainer
=
document
.
createElement
(
'
div
'
);
dom
.
addClass
(
this
.
viewContainer
,
'
split-view-container
'
);
this
.
el
.
appendChild
(
this
.
viewContainer
);
}
addView
(
view
:
IView
,
size
:
number
,
index
=
this
.
viewItems
.
length
):
void
{
...
...
@@ -118,13 +123,13 @@ export class SplitView implements IDisposable {
const
container
=
dom
.
$
(
'
.split-view-view
'
);
if
(
index
===
this
.
viewItems
.
length
)
{
this
.
el
.
appendChild
(
container
);
this
.
viewContainer
.
appendChild
(
container
);
}
else
{
this
.
el
.
insertBefore
(
container
,
this
.
el
.
children
.
item
(
index
));
this
.
viewContainer
.
insertBefore
(
container
,
this
.
viewContainer
.
children
.
item
(
index
));
}
const
onChangeDisposable
=
view
.
onDidChange
(
size
=>
this
.
onViewChange
(
item
,
size
));
const
containerDisposable
=
toDisposable
(()
=>
this
.
el
.
removeChild
(
container
));
const
containerDisposable
=
toDisposable
(()
=>
this
.
viewContainer
.
removeChild
(
container
));
const
disposable
=
combinedDisposable
([
onChangeDisposable
,
containerDisposable
]);
const
layoutContainer
=
this
.
orientation
===
Orientation
.
VERTICAL
...
...
@@ -218,9 +223,9 @@ export class SplitView implements IDisposable {
this
.
viewItems
.
splice
(
to
,
0
,
viewItem
);
if
(
to
+
1
<
this
.
viewItems
.
length
)
{
this
.
el
.
insertBefore
(
viewItem
.
container
,
this
.
viewItems
[
to
+
1
].
container
);
this
.
viewContainer
.
insertBefore
(
viewItem
.
container
,
this
.
viewItems
[
to
+
1
].
container
);
}
else
{
this
.
el
.
appendChild
(
viewItem
.
container
);
this
.
viewContainer
.
appendChild
(
viewItem
.
container
);
}
this
.
layoutViews
();
...
...
src/vs/workbench/parts/terminal/electron-browser/media/terminal.css
浏览文件 @
fede3435
...
...
@@ -33,10 +33,10 @@
bottom
:
2px
;
/* Matches padding-bottom on .terminal-outer-container */
top
:
0
;
}
.monaco-workbench
.panel.integrated-terminal
.monaco-split-view2.horizontal
.split-view-view
.first
.terminal-wrapper
{
.monaco-workbench
.panel.integrated-terminal
.monaco-split-view2.horizontal
.split-view-view
:first-child
.terminal-wrapper
{
margin-left
:
20px
;
}
.monaco-workbench
.panel.integrated-terminal
.monaco-split-view2.horizontal
.split-view-view
.last
.terminal-wrapper
{
.monaco-workbench
.panel.integrated-terminal
.monaco-split-view2.horizontal
.split-view-view
:last-child
.terminal-wrapper
{
margin-right
:
20px
;
}
...
...
@@ -52,7 +52,7 @@
.monaco-workbench
.panel.integrated-terminal
.xterm-viewport
{
margin-right
:
-10px
;
}
.monaco-workbench
.panel.integrated-terminal
.monaco-split-view2.horizontal
.split-view-view
.last
.xterm-viewport
{
.monaco-workbench
.panel.integrated-terminal
.monaco-split-view2.horizontal
.split-view-view
:last-child
.xterm-viewport
{
margin-right
:
-20px
;
}
...
...
@@ -111,7 +111,7 @@
left
:
0
;
user-select
:
none
;
}
.monaco-workbench
.panel.integrated-terminal
.monaco-split-view2.vertical
.split-view-view
:not
(
.last
)
.xterm
{
.monaco-workbench
.panel.integrated-terminal
.monaco-split-view2.vertical
.split-view-view
:not
(
:last-child
)
.xterm
{
/* When vertical and NOT the bottom terminal, align to the top instead to prevent the output jumping around erratically */
top
:
0
;
bottom
:
auto
;
...
...
src/vs/workbench/parts/terminal/electron-browser/terminalTab.ts
浏览文件 @
fede3435
...
...
@@ -130,7 +130,6 @@ class SplitPaneContainer {
this
.
_withDisabledLayout
(()
=>
this
.
_splitView
.
addView
(
child
,
size
,
index
));
this
.
resetSize
();
this
.
_refreshOrderClasses
();
this
.
_onDidChange
=
anyEvent
(...
this
.
_children
.
map
(
c
=>
c
.
onDidChange
));
}
...
...
@@ -146,19 +145,6 @@ class SplitPaneContainer {
this
.
_children
.
splice
(
index
,
1
);
this
.
_splitView
.
removeView
(
index
);
this
.
resetSize
();
this
.
_refreshOrderClasses
();
}
}
private
_refreshOrderClasses
():
void
{
this
.
_children
.
forEach
((
c
,
i
)
=>
{
c
.
setIsFirst
(
i
===
0
);
c
.
setIsLast
(
i
===
this
.
_children
.
length
-
1
);
});
// HACK: Force another layout, this isn't ideal but terminal instance uses the first/last CSS
// rules for sizing the terminal and the layout is performed when the split view is added.
if
(
this
.
_children
.
length
>
0
)
{
this
.
layout
(
this
.
_width
,
this
.
_height
);
}
}
...
...
@@ -217,7 +203,6 @@ class SplitPane implements IView {
public
instance
:
ITerminalInstance
;
public
orientation
:
Orientation
|
undefined
;
protected
_size
:
number
;
private
_container
:
HTMLElement
|
undefined
;
private
_onDidChange
:
Event
<
number
|
undefined
>
=
Event
.
None
;
public
get
onDidChange
():
Event
<
number
|
undefined
>
{
return
this
.
_onDidChange
;
}
...
...
@@ -231,22 +216,9 @@ class SplitPane implements IView {
if
(
!
container
)
{
return
;
}
this
.
_container
=
container
;
this
.
instance
.
attachToElement
(
container
);
}
public
setIsFirst
(
isFirst
:
boolean
):
void
{
if
(
this
.
_container
)
{
this
.
_container
.
classList
.
toggle
(
'
first
'
,
isFirst
);
}
}
public
setIsLast
(
isLast
:
boolean
):
void
{
if
(
this
.
_container
)
{
this
.
_container
.
classList
.
toggle
(
'
last
'
,
isLast
);
}
}
public
layout
(
size
:
number
):
void
{
// Only layout when both sizes are known
this
.
_size
=
size
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录