Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
6eeb98dc
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,发现更多精彩内容 >>
提交
6eeb98dc
编写于
10月 18, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup workbench layout method
上级
3387ad0a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
8 deletion
+13
-8
src/vs/workbench/browser/layout.ts
src/vs/workbench/browser/layout.ts
+8
-3
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+5
-5
未找到文件。
src/vs/workbench/browser/layout.ts
浏览文件 @
6eeb98dc
...
...
@@ -46,6 +46,11 @@ interface ComputedStyles {
statusbar
:
{
height
:
number
;
};
}
export
interface
ILayoutOptions
{
forceStyleReCompute
?:
boolean
;
toggleMaximizedPanel
?:
boolean
;
}
/**
* The workbench layout is responsible to lay out all parts that make the Workbench.
*/
...
...
@@ -297,8 +302,8 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
};
}
public
layout
(
forceStyleReCompute
?:
boolean
,
toggleMaximizedPanel
?:
boolean
):
void
{
if
(
forceStyleReCompute
)
{
public
layout
(
options
?:
ILayoutOptions
):
void
{
if
(
options
&&
options
.
forceStyleReCompute
)
{
this
.
computeStyle
();
this
.
editor
.
getLayout
().
computeStyle
();
this
.
sidebar
.
getLayout
().
computeStyle
();
...
...
@@ -346,7 +351,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
}
else
{
panelHeight
=
sidebarSize
.
height
*
0.4
;
}
if
(
toggleMaximizedPanel
)
{
if
(
options
&&
options
.
toggleMaximizedPanel
)
{
panelHeight
=
panelHeight
===
maxPanelHeight
?
sidebarSize
.
height
*
0.4
:
maxPanelHeight
;
}
const
panelDimension
=
new
Dimension
(
this
.
workbenchSize
.
width
-
sidebarSize
.
width
-
activityBarSize
.
width
,
panelHeight
);
...
...
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
6eeb98dc
...
...
@@ -524,7 +524,7 @@ export class Workbench implements IPartService {
// Layout
if
(
!
skipLayout
)
{
this
.
workbenchLayout
.
layout
(
true
);
this
.
workbenchLayout
.
layout
(
{
forceStyleReCompute
:
true
}
);
}
}
...
...
@@ -544,7 +544,7 @@ export class Workbench implements IPartService {
// Layout
if
(
!
skipLayout
)
{
this
.
workbenchLayout
.
layout
(
true
);
this
.
workbenchLayout
.
layout
(
{
forceStyleReCompute
:
true
}
);
}
// If sidebar becomes hidden, also hide the current active Viewlet if any
...
...
@@ -587,7 +587,7 @@ export class Workbench implements IPartService {
// Layout
if
(
!
skipLayout
)
{
this
.
workbenchLayout
.
layout
(
true
);
this
.
workbenchLayout
.
layout
(
{
forceStyleReCompute
:
true
}
);
}
// If panel part becomes hidden, also hide the current active panel if any
...
...
@@ -615,7 +615,7 @@ export class Workbench implements IPartService {
}
public
toggleMaximizedPanel
():
void
{
this
.
workbenchLayout
.
layout
(
true
,
true
);
this
.
workbenchLayout
.
layout
(
{
forceStyleReCompute
:
true
,
toggleMaximizedPanel
:
true
}
);
}
public
getSideBarPosition
():
Position
{
...
...
@@ -638,7 +638,7 @@ export class Workbench implements IPartService {
this
.
sidebarPart
.
getContainer
().
addClass
(
newPositionValue
);
// Layout
this
.
workbenchLayout
.
layout
(
true
);
this
.
workbenchLayout
.
layout
(
{
forceStyleReCompute
:
true
}
);
}
public
dispose
():
void
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录