Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
2971f550
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,发现更多精彩内容 >>
提交
2971f550
编写于
4月 25, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
grid - move title controls over to editor2
上级
86707d17
变更
17
显示空白变更内容
内联
并排
Showing
17 changed file
with
39 addition
and
29 deletion
+39
-29
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
+18
-6
src/vs/workbench/browser/parts/editor2/media/close-dirty-inverse.svg
...bench/browser/parts/editor2/media/close-dirty-inverse.svg
+1
-0
src/vs/workbench/browser/parts/editor2/media/close-dirty.svg
src/vs/workbench/browser/parts/editor2/media/close-dirty.svg
+1
-0
src/vs/workbench/browser/parts/editor2/media/close-inverse.svg
...s/workbench/browser/parts/editor2/media/close-inverse.svg
+1
-0
src/vs/workbench/browser/parts/editor2/media/close.svg
src/vs/workbench/browser/parts/editor2/media/close.svg
+1
-0
src/vs/workbench/browser/parts/editor2/media/nextNoTabsTitleControl.css
...ch/browser/parts/editor2/media/nextNoTabsTitleControl.css
+0
-0
src/vs/workbench/browser/parts/editor2/media/nextTabsTitleControl.css
...ench/browser/parts/editor2/media/nextTabsTitleControl.css
+0
-0
src/vs/workbench/browser/parts/editor2/media/nextTitleControl.css
...orkbench/browser/parts/editor2/media/nextTitleControl.css
+1
-10
src/vs/workbench/browser/parts/editor2/media/split-editor-horizontal-inverse.svg
...r/parts/editor2/media/split-editor-horizontal-inverse.svg
+1
-0
src/vs/workbench/browser/parts/editor2/media/split-editor-horizontal.svg
...h/browser/parts/editor2/media/split-editor-horizontal.svg
+1
-0
src/vs/workbench/browser/parts/editor2/media/split-editor-vertical-inverse.svg
...ser/parts/editor2/media/split-editor-vertical-inverse.svg
+1
-0
src/vs/workbench/browser/parts/editor2/media/split-editor-vertical.svg
...nch/browser/parts/editor2/media/split-editor-vertical.svg
+1
-0
src/vs/workbench/browser/parts/editor2/nextEditorGroupView.ts
...vs/workbench/browser/parts/editor2/nextEditorGroupView.ts
+2
-3
src/vs/workbench/browser/parts/editor2/nextNoTabsTitleControl.ts
...workbench/browser/parts/editor2/nextNoTabsTitleControl.ts
+3
-3
src/vs/workbench/browser/parts/editor2/nextTabsTitleControl.ts
...s/workbench/browser/parts/editor2/nextTabsTitleControl.ts
+3
-3
src/vs/workbench/browser/parts/editor2/nextTitleControl.ts
src/vs/workbench/browser/parts/editor2/nextTitleControl.ts
+3
-3
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+1
-1
未找到文件。
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
浏览文件 @
2971f550
...
...
@@ -26,9 +26,6 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
TabsTitleControl
}
from
'
vs/workbench/browser/parts/editor/tabsTitleControl
'
;
import
{
ITitleAreaControl
}
from
'
vs/workbench/browser/parts/editor/titleControl
'
;
import
{
NoTabsTitleControl
}
from
'
vs/workbench/browser/parts/editor/noTabsTitleControl
'
;
import
{
IEditorStacksModel
,
IStacksModelChangeEvent
,
IEditorGroup
,
EditorOptions
,
TextEditorOptions
,
IEditorIdentifier
,
EditorInput
}
from
'
vs/workbench/common/editor
'
;
import
{
getCodeEditor
}
from
'
vs/editor/browser/services/codeEditorService
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
...
...
@@ -40,6 +37,21 @@ import { ResourcesDropHandler, LocalSelectionTransfer, DraggedEditorIdentifier }
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
export
class
NoOpTitleAreaControl
{
private
container
=
document
.
createElement
(
'
div
'
);
hasContext
():
boolean
{
return
false
;
}
allowDragging
(
element
:
HTMLElement
):
boolean
{
return
false
;
}
getContainer
():
HTMLElement
{
return
this
.
container
;
}
setDragged
(
dragged
:
boolean
):
void
{
}
create
(
parent
:
HTMLElement
):
void
{
}
refresh
(
instant
?:
boolean
):
void
{
}
update
(
instant
?:
boolean
):
void
{
}
updateEditorActionsToolbar
():
void
{
}
layout
(
dimension
:
DOM
.
Dimension
):
void
{
}
dispose
():
void
{
}
setContext
(
group
:
IEditorGroup
):
void
{
}
}
export
enum
Rochade
{
NONE
,
...
...
@@ -282,7 +294,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
// Title Control
if
(
titleControl
)
{
const
usingTabs
=
(
titleControl
instanceof
TabsTitle
Control
);
const
usingTabs
=
(
titleControl
instanceof
NoOpTitleArea
Control
);
// Recreate title when tabs change
if
(
usingTabs
!==
this
.
tabOptions
.
showTabs
)
{
...
...
@@ -1396,7 +1408,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
}
private
createTitleControl
(
context
:
IEditorGroup
,
silo
:
Builder
,
container
:
Builder
,
instantiationService
:
IInstantiationService
):
void
{
const
titleAreaControl
=
instantiationService
.
createInstance
<
ITitleAreaControl
>
(
this
.
tabOptions
.
showTabs
?
TabsTitleControl
:
NoTabsTitle
Control
);
const
titleAreaControl
=
instantiationService
.
createInstance
<
NoOpTitleAreaControl
>
(
this
.
tabOptions
.
showTabs
?
NoOpTitleAreaControl
:
NoOpTitleArea
Control
);
titleAreaControl
.
create
(
container
.
getHTMLElement
());
titleAreaControl
.
setContext
(
context
);
titleAreaControl
.
refresh
(
true
/* instant */
);
...
...
@@ -2230,7 +2242,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
return
this
.
getFromContainer
(
position
,
EditorGroupsControl
.
PROGRESS_BAR_CONTROL_KEY
);
}
private
getTitleAreaControl
(
position
:
Position
):
I
TitleAreaControl
{
private
getTitleAreaControl
(
position
:
Position
):
NoOp
TitleAreaControl
{
return
this
.
getFromContainer
(
position
,
EditorGroupsControl
.
TITLE_AREA_CONTROL_KEY
);
}
...
...
src/vs/workbench/browser/parts/editor2/media/close-dirty-inverse.svg
0 → 100644
浏览文件 @
2971f550
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 16 16"
enable-background=
"new 0 0 16 16"
height=
"16"
width=
"16"
><circle
fill=
"#C5C5C5"
cx=
"8"
cy=
"8"
r=
"4"
/></svg>
\ No newline at end of file
src/vs/workbench/browser/parts/editor2/media/close-dirty.svg
0 → 100644
浏览文件 @
2971f550
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 16 16"
enable-background=
"new 0 0 16 16"
height=
"16"
width=
"16"
><circle
fill=
"#424242"
cx=
"8"
cy=
"8"
r=
"4"
/></svg>
\ No newline at end of file
src/vs/workbench/browser/parts/editor2/media/close-inverse.svg
0 → 100644
浏览文件 @
2971f550
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"3 3 16 16"
enable-background=
"new 3 3 16 16"
><polygon
fill=
"#e8e8e8"
points=
"12.597,11.042 15.4,13.845 13.844,15.4 11.042,12.598 8.239,15.4 6.683,13.845 9.485,11.042 6.683,8.239 8.238,6.683 11.042,9.486 13.845,6.683 15.4,8.239"
/></svg>
\ No newline at end of file
src/vs/workbench/browser/parts/editor2/media/close.svg
0 → 100644
浏览文件 @
2971f550
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"3 3 16 16"
enable-background=
"new 3 3 16 16"
><polygon
fill=
"#424242"
points=
"12.597,11.042 15.4,13.845 13.844,15.4 11.042,12.598 8.239,15.4 6.683,13.845 9.485,11.042 6.683,8.239 8.238,6.683 11.042,9.486 13.845,6.683 15.4,8.239"
/></svg>
\ No newline at end of file
src/vs/workbench/browser/parts/editor
/media/notabstitle
.css
→
src/vs/workbench/browser/parts/editor
2/media/nextNoTabsTitleControl
.css
浏览文件 @
2971f550
文件已移动
src/vs/workbench/browser/parts/editor
/media/tabstitle
.css
→
src/vs/workbench/browser/parts/editor
2/media/nextTabsTitleControl
.css
浏览文件 @
2971f550
文件已移动
src/vs/workbench/browser/parts/editor
/media/titlec
ontrol.css
→
src/vs/workbench/browser/parts/editor
2/media/nextTitleC
ontrol.css
浏览文件 @
2971f550
...
...
@@ -101,12 +101,3 @@
.hc-black
.monaco-workbench
>
.part.editor
>
.content.horizontal-layout
>
.one-editor-silo
>
.container
>
.title
.split-editor-action
{
background
:
url('split-editor-horizontal-inverse.svg')
center
center
no-repeat
;
}
\ No newline at end of file
.monaco-workbench
.show-group-editors-action
{
background
:
url('stackview.svg')
center
center
no-repeat
;
}
.vs-dark
.monaco-workbench
.show-group-editors-action
,
.hc-black
.monaco-workbench
.show-group-editors-action
{
background
:
url('stackview-inverse.svg')
center
center
no-repeat
;
}
src/vs/workbench/browser/parts/editor2/media/split-editor-horizontal-inverse.svg
0 → 100644
浏览文件 @
2971f550
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
><style>
.icon-canvas-transparent{opacity:0;fill:#2d2d30}.icon-vs-out{fill:#2d2d30}.icon-vs-bg{fill:#c5c5c5}.icon-vs-fg{fill:#2b282e}
</style><path
class=
"icon-canvas-transparent"
d=
"M16 16H0V0h16v16z"
id=
"canvas"
/><path
class=
"icon-vs-out"
d=
"M16 15H0V1h16v14z"
id=
"outline"
style=
"display: none;"
/><path
class=
"icon-vs-bg"
d=
"M1 2v12h14V2H1zm13 11H2v-3h12v3zm0-5H2V5h12v3z"
id=
"iconBg"
/><g
id=
"iconFg"
style=
"display: none;"
><path
class=
"icon-vs-fg"
d=
"M14 8H2V5h12v3zm0 2H2v3h12v-3z"
/></g></svg>
\ No newline at end of file
src/vs/workbench/browser/parts/editor2/media/split-editor-horizontal.svg
0 → 100644
浏览文件 @
2971f550
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
><style>
.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-bg{fill:#424242}.icon-vs-fg{fill:#f0eff1}
</style><path
class=
"icon-canvas-transparent"
d=
"M16 16H0V0h16v16z"
id=
"canvas"
/><path
class=
"icon-vs-out"
d=
"M16 15H0V1h16v14z"
id=
"outline"
style=
"display: none;"
/><path
class=
"icon-vs-bg"
d=
"M1 2v12h14V2H1zm13 11H2v-3h12v3zm0-5H2V5h12v3z"
id=
"iconBg"
/><g
id=
"iconFg"
style=
"display: none;"
><path
class=
"icon-vs-fg"
d=
"M14 8H2V5h12v3zm0 2H2v3h12v-3z"
/></g></svg>
\ No newline at end of file
src/vs/workbench/browser/parts/editor2/media/split-editor-vertical-inverse.svg
0 → 100644
浏览文件 @
2971f550
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"0 -1 16 16"
enable-background=
"new 0 -1 16 16"
><path
fill=
"#C5C5C5"
d=
"M1 1v12h14v-12h-14zm1 3h4.999v8h-4.999v-8zm12 8h-5.001v-8h5.001v8z"
/></svg>
\ No newline at end of file
src/vs/workbench/browser/parts/editor2/media/split-editor-vertical.svg
0 → 100644
浏览文件 @
2971f550
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"0 -1 16 16"
enable-background=
"new 0 -1 16 16"
><path
fill=
"#656565"
d=
"M1 1v12h14v-12h-14zm1 3h4.999v8h-4.999v-8zm12 8h-5.001v-8h5.001v8z"
/></svg>
\ No newline at end of file
src/vs/workbench/browser/parts/editor2/nextEditorGroupView.ts
浏览文件 @
2971f550
...
...
@@ -14,14 +14,13 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
addClass
,
addClasses
,
Dimension
}
from
'
vs/base/browser/dom
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
ITitleAreaControl
}
from
'
vs/workbench/browser/parts/editor/titleControl
'
;
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
{
editorBackground
,
contrastBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
Themable
,
EDITOR_GROUP_HEADER_TABS_BORDER
,
EDITOR_GROUP_HEADER_TABS_BACKGROUND
}
from
'
vs/workbench/common/theme
'
;
import
{
INextEditor
,
INextEditorGroup
}
from
'
vs/workbench/services/editor/common/nextEditorGroupsService
'
;
import
{
INextTitleAreaControl
}
from
'
vs/workbench/browser/parts/editor2/nextTitleControl
'
;
export
class
NextEditorGroupView
extends
Themable
implements
IView
,
INextEditorGroup
{
...
...
@@ -40,7 +39,7 @@ export class NextEditorGroupView extends Themable implements IView, INextEditorG
private
_element
:
HTMLElement
;
private
container
:
HTMLElement
;
private
titleAreaControl
:
ITitleAreaControl
;
private
titleAreaControl
:
I
Next
TitleAreaControl
;
private
progressBar
:
ProgressBar
;
constructor
(
...
...
src/vs/workbench/browser/parts/editor
/n
oTabsTitleControl.ts
→
src/vs/workbench/browser/parts/editor
2/nextN
oTabsTitleControl.ts
浏览文件 @
2971f550
...
...
@@ -5,17 +5,17 @@
'
use strict
'
;
import
'
vs/css!./media/n
otabstitle
'
;
import
'
vs/css!./media/n
extNoTabsTitleControl
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
{
toResource
}
from
'
vs/workbench/common/editor
'
;
import
*
as
DOM
from
'
vs/base/browser/dom
'
;
import
{
TitleControl
}
from
'
vs/workbench/browser/parts/editor/t
itleControl
'
;
import
{
NextTitleControl
}
from
'
vs/workbench/browser/parts/editor2/nextT
itleControl
'
;
import
{
ResourceLabel
}
from
'
vs/workbench/browser/labels
'
;
import
{
Verbosity
}
from
'
vs/platform/editor/common/editor
'
;
import
{
TAB_ACTIVE_FOREGROUND
,
TAB_UNFOCUSED_ACTIVE_FOREGROUND
}
from
'
vs/workbench/common/theme
'
;
import
{
EventType
as
TouchEventType
,
GestureEvent
,
Gesture
}
from
'
vs/base/browser/touch
'
;
export
class
N
oTabsTitleControl
extends
TitleControl
{
export
class
N
extNoTabsTitleControl
extends
Next
TitleControl
{
private
titleContainer
:
HTMLElement
;
private
editorLabel
:
ResourceLabel
;
...
...
src/vs/workbench/browser/parts/editor
/t
absTitleControl.ts
→
src/vs/workbench/browser/parts/editor
2/nextT
absTitleControl.ts
浏览文件 @
2971f550
...
...
@@ -5,7 +5,7 @@
'
use strict
'
;
import
'
vs/css!./media/
tabstitle
'
;
import
'
vs/css!./media/
nextTabsTitleControl
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
...
...
@@ -28,7 +28,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IMenuService
}
from
'
vs/platform/actions/common/actions
'
;
import
{
TitleControl
}
from
'
vs/workbench/browser/parts/editor/t
itleControl
'
;
import
{
NextTitleControl
}
from
'
vs/workbench/browser/parts/editor2/nextT
itleControl
'
;
import
{
IQuickOpenService
}
from
'
vs/platform/quickOpen/common/quickOpen
'
;
import
{
IDisposable
,
dispose
,
combinedDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
ScrollableElement
}
from
'
vs/base/browser/ui/scrollbar/scrollableElement
'
;
...
...
@@ -50,7 +50,7 @@ interface IEditorInputLabel {
type
AugmentedLabel
=
IEditorInputLabel
&
{
editor
:
IEditorInput
};
export
class
TabsTitleControl
extends
TitleControl
{
export
class
NextTabsTitleControl
extends
Next
TitleControl
{
private
titleContainer
:
HTMLElement
;
private
tabsContainer
:
HTMLElement
;
private
editorToolbarContainer
:
HTMLElement
;
...
...
src/vs/workbench/browser/parts/editor
/t
itleControl.ts
→
src/vs/workbench/browser/parts/editor
2/nextT
itleControl.ts
浏览文件 @
2971f550
...
...
@@ -5,7 +5,7 @@
'
use strict
'
;
import
'
vs/css!./media/
titlec
ontrol
'
;
import
'
vs/css!./media/
nextTitleC
ontrol
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
prepareActions
}
from
'
vs/workbench/browser/actions
'
;
import
{
IAction
,
Action
,
IRunEvent
}
from
'
vs/base/common/actions
'
;
...
...
@@ -43,7 +43,7 @@ export interface IToolbarActions {
secondary
:
IAction
[];
}
export
interface
ITitleAreaControl
{
export
interface
I
Next
TitleAreaControl
{
setContext
(
group
:
IEditorGroup
):
void
;
hasContext
():
boolean
;
allowDragging
(
element
:
HTMLElement
):
boolean
;
...
...
@@ -57,7 +57,7 @@ export interface ITitleAreaControl {
dispose
():
void
;
}
export
abstract
class
TitleControl
extends
Themable
implements
I
TitleAreaControl
{
export
abstract
class
NextTitleControl
extends
Themable
implements
INext
TitleAreaControl
{
protected
stacks
:
IEditorStacksModel
;
protected
context
:
IEditorGroup
;
...
...
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
2971f550
...
...
@@ -1139,7 +1139,7 @@ export class Workbench implements IPartService {
const
editorContainer
=
this
.
editorPart
.
getContainer
();
if
(
visibleEditors
===
0
)
{
this
.
editorsVisibleContext
.
reset
();
this
.
editorBackgroundDelayer
.
trigger
(()
=>
DOM
.
addClass
(
editorContainer
,
'
empty2
'
));
// TODO@grid reenable (find "empty2")
this
.
editorBackgroundDelayer
.
trigger
(()
=>
DOM
.
addClass
(
editorContainer
,
'
empty2
'
));
// TODO@grid reenable (find "empty2")
and move this into editorPart.ts!
}
else
{
this
.
editorsVisibleContext
.
set
(
true
);
this
.
editorBackgroundDelayer
.
trigger
(()
=>
DOM
.
removeClass
(
editorContainer
,
'
empty2
'
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录