Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
6ebd8dd3
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,发现更多精彩内容 >>
提交
6ebd8dd3
编写于
4月 23, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
grid - some more title widget polish
上级
3e51873c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
47 addition
and
9 deletion
+47
-9
src/vs/workbench/browser/parts/editor2/nextEditorGroupView.ts
...vs/workbench/browser/parts/editor2/nextEditorGroupView.ts
+41
-6
src/vs/workbench/browser/parts/editor2/nextEditorGroupsViewer.ts
...workbench/browser/parts/editor2/nextEditorGroupsViewer.ts
+5
-2
src/vs/workbench/browser/parts/editor2/nextEditorPart.ts
src/vs/workbench/browser/parts/editor2/nextEditorPart.ts
+1
-1
未找到文件。
src/vs/workbench/browser/parts/editor2/nextEditorGroupView.ts
浏览文件 @
6ebd8dd3
...
@@ -14,11 +14,15 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
...
@@ -14,11 +14,15 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
addClass
,
addClasses
,
Dimension
}
from
'
vs/base/browser/dom
'
;
import
{
addClass
,
addClasses
,
Dimension
}
from
'
vs/base/browser/dom
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
ITitleAreaControl
}
from
'
vs/workbench/browser/parts/editor/titleControl
'
;
import
{
ITitleAreaControl
}
from
'
vs/workbench/browser/parts/editor/titleControl
'
;
import
{
TabsTitleControl
}
from
'
vs/workbench/browser/parts/editor/tabsTitleControl
'
;
import
{
TabsTitleControl
}
from
'
vs/workbench/browser/parts/editor/tabsTitleControl
'
;
import
{
ProgressBar
}
from
'
vs/base/browser/ui/progressbar/progressbar
'
;
import
{
attachProgressBarStyler
}
from
'
vs/platform/theme/common/styler
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
Themable
,
EDITOR_GROUP_HEADER_TABS_BORDER
,
EDITOR_GROUP_HEADER_TABS_BACKGROUND
}
from
'
../../../common/theme
'
;
import
{
editorBackground
,
contrastBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
export
class
NextEditorGroupView
extends
Dispos
able
implements
IView
{
export
class
NextEditorGroupView
extends
Them
able
implements
IView
{
private
static
readonly
EDITOR_TITLE_HEIGHT
=
35
;
private
static
readonly
EDITOR_TITLE_HEIGHT
=
35
;
...
@@ -34,12 +38,15 @@ export class NextEditorGroupView extends Disposable implements IView {
...
@@ -34,12 +38,15 @@ export class NextEditorGroupView extends Disposable implements IView {
private
container
:
HTMLElement
;
private
container
:
HTMLElement
;
private
titleAreaControl
:
ITitleAreaControl
;
private
titleAreaControl
:
ITitleAreaControl
;
private
progressBar
:
ProgressBar
;
private
editorContainer
:
HTMLElement
;
constructor
(
constructor
(
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IContextKeyService
private
contextKeyService
:
IContextKeyService
@
IContextKeyService
private
contextKeyService
:
IContextKeyService
,
@
IThemeService
themeService
:
IThemeService
)
{
)
{
super
();
super
(
themeService
);
this
.
_group
=
this
.
_register
(
instantiationService
.
createInstance
(
EditorGroup
,
'
Editor Group
'
));
// TODO@grid group label?
this
.
_group
=
this
.
_register
(
instantiationService
.
createInstance
(
EditorGroup
,
'
Editor Group
'
));
// TODO@grid group label?
...
@@ -83,8 +90,36 @@ export class NextEditorGroupView extends Disposable implements IView {
...
@@ -83,8 +90,36 @@ export class NextEditorGroupView extends Disposable implements IView {
this
.
titleAreaControl
.
setContext
(
this
.
_group
);
this
.
titleAreaControl
.
setContext
(
this
.
_group
);
this
.
titleAreaControl
.
refresh
(
true
/* instant */
);
this
.
titleAreaControl
.
refresh
(
true
/* instant */
);
// TODO@grid progress bar
// Progress Bar
// TODO@grid editors container
this
.
progressBar
=
new
ProgressBar
(
this
.
container
);
this
.
_register
(
attachProgressBarStyler
(
this
.
progressBar
,
this
.
themeService
));
this
.
progressBar
.
hide
();
// Editor Container
this
.
editorContainer
=
document
.
createElement
(
'
div
'
);
addClass
(
this
.
editorContainer
,
'
editor-container
'
);
this
.
container
.
appendChild
(
this
.
editorContainer
);
// Update Styles
this
.
updateStyles
();
}
protected
updateStyles
():
void
{
super
.
updateStyles
();
// Title control (TODO@grid respect tab options)
const
titleContainer
=
this
.
titleAreaControl
.
getContainer
();
const
borderColor
=
this
.
getColor
(
EDITOR_GROUP_HEADER_TABS_BORDER
)
||
this
.
getColor
(
contrastBorder
);
titleContainer
.
style
.
backgroundColor
=
this
.
getColor
(
EDITOR_GROUP_HEADER_TABS_BACKGROUND
);
titleContainer
.
style
.
borderBottomWidth
=
borderColor
?
'
1px
'
:
null
;
titleContainer
.
style
.
borderBottomStyle
=
borderColor
?
'
solid
'
:
null
;
titleContainer
.
style
.
borderBottomColor
=
borderColor
;
// Editor container background
this
.
_element
.
style
.
backgroundColor
=
this
.
getColor
(
editorBackground
);
// TODO@grid Editor container border
}
}
openEditor
(
input
:
EditorInput
,
options
?:
EditorOptions
):
void
{
openEditor
(
input
:
EditorInput
,
options
?:
EditorOptions
):
void
{
...
...
src/vs/workbench/browser/parts/editor2/nextEditorGroupsViewer.ts
浏览文件 @
6ebd8dd3
...
@@ -10,19 +10,22 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
...
@@ -10,19 +10,22 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
Orientation
}
from
'
vs/base/browser/ui/splitview/splitview
'
;
import
{
Orientation
}
from
'
vs/base/browser/ui/splitview/splitview
'
;
import
{
EditorLocation
}
from
'
vs/workbench/browser/parts/editor2/nextEditor
'
;
import
{
EditorLocation
}
from
'
vs/workbench/browser/parts/editor2/nextEditor
'
;
import
{
Dimension
,
clearNode
}
from
'
vs/base/browser/dom
'
;
import
{
Dimension
,
clearNode
}
from
'
vs/base/browser/dom
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
export
enum
EditorGroupsOrientation
{
export
enum
EditorGroupsOrientation
{
VERTICAL
,
VERTICAL
,
HORIZONTAL
HORIZONTAL
}
}
export
class
NextEditorGroupsViewer
{
export
class
NextEditorGroupsViewer
extends
Disposable
{
private
_element
:
HTMLElement
;
private
_element
:
HTMLElement
;
private
singletonTmpView
:
NextEditorGroupView
;
private
singletonTmpView
:
NextEditorGroupView
;
constructor
(
constructor
(
@
IInstantiationService
private
instantiationService
:
IInstantiationService
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
)
{
super
();
this
.
_element
=
document
.
createElement
(
'
div
'
);
this
.
_element
=
document
.
createElement
(
'
div
'
);
}
}
...
@@ -40,7 +43,7 @@ export class NextEditorGroupsViewer {
...
@@ -40,7 +43,7 @@ export class NextEditorGroupsViewer {
split
(
location
:
EditorLocation
,
orientation
:
EditorGroupsOrientation
):
NextEditorGroupView
{
split
(
location
:
EditorLocation
,
orientation
:
EditorGroupsOrientation
):
NextEditorGroupView
{
if
(
!
this
.
singletonTmpView
)
{
if
(
!
this
.
singletonTmpView
)
{
this
.
singletonTmpView
=
this
.
instantiationService
.
createInstance
(
NextEditorGroupView
);
// TODO@grid hook into GridWidget
this
.
singletonTmpView
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
NextEditorGroupView
)
);
// TODO@grid hook into GridWidget
const
parent
=
this
.
_element
.
parentElement
;
const
parent
=
this
.
_element
.
parentElement
;
clearNode
(
parent
);
clearNode
(
parent
);
...
...
src/vs/workbench/browser/parts/editor2/nextEditorPart.ts
浏览文件 @
6ebd8dd3
...
@@ -44,7 +44,7 @@ export class NextEditorPart extends Part implements INextEditorPartService {
...
@@ -44,7 +44,7 @@ export class NextEditorPart extends Part implements INextEditorPartService {
// this.memento = this.getMemento(this.storageService, Scope.WORKSPACE);
// this.memento = this.getMemento(this.storageService, Scope.WORKSPACE);
this
.
viewer
=
this
.
instantiationService
.
createInstance
(
NextEditorGroupsViewer
);
this
.
viewer
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
NextEditorGroupsViewer
)
);
this
.
initStyles
();
this
.
initStyles
();
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录