Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
2b029679
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,发现更多精彩内容 >>
提交
2b029679
编写于
3月 10, 2020
作者:
S
SteVen Batten
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix #92387
上级
8c596fbf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
9 deletion
+15
-9
src/vs/base/browser/ui/splitview/paneview.ts
src/vs/base/browser/ui/splitview/paneview.ts
+14
-8
src/vs/workbench/browser/parts/views/viewPaneContainer.ts
src/vs/workbench/browser/parts/views/viewPaneContainer.ts
+1
-1
未找到文件。
src/vs/base/browser/ui/splitview/paneview.ts
浏览文件 @
2b029679
...
...
@@ -22,6 +22,7 @@ export interface IPaneOptions {
minimumBodySize
?:
number
;
maximumBodySize
?:
number
;
expanded
?:
boolean
;
orientation
?:
Orientation
;
title
:
string
;
}
...
...
@@ -50,6 +51,7 @@ export abstract class Pane extends Disposable implements IView {
private
body
!
:
HTMLElement
;
protected
_expanded
:
boolean
;
protected
_orientation
:
Orientation
;
protected
_preventCollapse
?:
boolean
;
private
expandedSize
:
number
|
undefined
=
undefined
;
...
...
@@ -117,11 +119,12 @@ export abstract class Pane extends Disposable implements IView {
return
headerSize
+
maximumBodySize
;
}
width
:
number
=
0
;
orthogonalSize
:
number
=
0
;
constructor
(
options
:
IPaneOptions
)
{
super
();
this
.
_expanded
=
typeof
options
.
expanded
===
'
undefined
'
?
true
:
!!
options
.
expanded
;
this
.
_orientation
=
typeof
options
.
orientation
===
'
undefined
'
?
Orientation
.
VERTICAL
:
Orientation
.
HORIZONTAL
;
this
.
ariaHeaderLabel
=
localize
(
'
viewSection
'
,
"
{0} Section
"
,
options
.
title
);
this
.
_minimumBodySize
=
typeof
options
.
minimumBodySize
===
'
number
'
?
options
.
minimumBodySize
:
120
;
this
.
_maximumBodySize
=
typeof
options
.
maximumBodySize
===
'
number
'
?
options
.
maximumBodySize
:
Number
.
POSITIVE_INFINITY
;
...
...
@@ -208,12 +211,15 @@ export abstract class Pane extends Disposable implements IView {
this
.
renderBody
(
this
.
body
);
}
layout
(
height
:
number
):
void
{
layout
(
size
:
number
):
void
{
const
headerSize
=
this
.
headerVisible
?
Pane
.
HEADER_SIZE
:
0
;
const
width
=
this
.
_orientation
===
Orientation
.
VERTICAL
?
this
.
orthogonalSize
:
size
;
const
height
=
this
.
_orientation
===
Orientation
.
VERTICAL
?
size
-
headerSize
:
this
.
orthogonalSize
-
headerSize
;
if
(
this
.
isExpanded
())
{
this
.
layoutBody
(
height
-
headerSize
,
this
.
width
);
this
.
expandedSize
=
height
;
this
.
layoutBody
(
height
,
width
);
this
.
expandedSize
=
size
;
}
}
...
...
@@ -391,7 +397,7 @@ export class PaneView extends Disposable {
private
dndContext
:
IDndContext
=
{
draggable
:
null
};
private
el
:
HTMLElement
;
private
paneItems
:
IPaneItem
[]
=
[];
private
width
:
number
=
0
;
private
orthogonalSize
:
number
=
0
;
private
splitview
:
SplitView
;
private
orientation
:
Orientation
;
private
animationTimer
:
number
|
undefined
=
undefined
;
...
...
@@ -417,7 +423,7 @@ export class PaneView extends Disposable {
const
paneItem
=
{
pane
:
pane
,
disposable
:
disposables
};
this
.
paneItems
.
splice
(
index
,
0
,
paneItem
);
pane
.
width
=
this
.
width
;
pane
.
orthogonalSize
=
this
.
orthogonalSize
;
this
.
splitview
.
addView
(
pane
,
size
,
index
);
if
(
this
.
dnd
)
{
...
...
@@ -474,10 +480,10 @@ export class PaneView extends Disposable {
}
layout
(
height
:
number
,
width
:
number
):
void
{
this
.
width
=
width
;
this
.
orthogonalSize
=
this
.
orientation
===
Orientation
.
VERTICAL
?
width
:
height
;
for
(
const
paneItem
of
this
.
paneItems
)
{
paneItem
.
pane
.
width
=
width
;
paneItem
.
pane
.
orthogonalSize
=
this
.
orthogonalSize
;
}
this
.
splitview
.
layout
(
this
.
orientation
===
Orientation
.
HORIZONTAL
?
width
:
height
);
...
...
src/vs/workbench/browser/parts/views/viewPaneContainer.ts
浏览文件 @
2b029679
...
...
@@ -210,7 +210,7 @@ export abstract class ViewPane extends Pane implements IView {
@
IThemeService
protected
themeService
:
IThemeService
,
@
ITelemetryService
protected
telemetryService
:
ITelemetryService
,
)
{
super
(
options
);
super
(
{
...
options
,
...{
orientation
:
viewDescriptorService
.
getViewLocation
(
options
.
id
)
===
ViewContainerLocation
.
Panel
?
Orientation
.
HORIZONTAL
:
Orientation
.
VERTICAL
}
}
);
this
.
id
=
options
.
id
;
this
.
title
=
options
.
title
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录