Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9fa09884
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,发现更多精彩内容 >>
提交
9fa09884
编写于
12月 05, 2017
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more tab layout tweaks
上级
6bc5a14b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
26 addition
and
8 deletion
+26
-8
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
+7
-1
src/vs/workbench/browser/parts/editor/editorPart.ts
src/vs/workbench/browser/parts/editor/editorPart.ts
+4
-1
src/vs/workbench/browser/parts/editor/media/tabstitle.css
src/vs/workbench/browser/parts/editor/media/tabstitle.css
+6
-5
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
+6
-0
src/vs/workbench/common/editor.ts
src/vs/workbench/common/editor.ts
+2
-1
src/vs/workbench/services/group/common/groupService.ts
src/vs/workbench/services/group/common/groupService.ts
+1
-0
未找到文件。
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
浏览文件 @
9fa09884
...
...
@@ -228,6 +228,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
private
updateTabOptions
(
tabOptions
:
IEditorTabOptions
,
refresh
?:
boolean
):
void
{
const
tabCloseButton
=
this
.
tabOptions
?
this
.
tabOptions
.
tabCloseButton
:
'
right
'
;
const
tabSizing
=
this
.
tabOptions
?
this
.
tabOptions
.
tabSizing
:
'
fit
'
;
const
iconTheme
=
this
.
tabOptions
?
this
.
tabOptions
.
iconTheme
:
'
vs-seti
'
;
this
.
tabOptions
=
tabOptions
;
...
...
@@ -266,7 +267,12 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
}
// Refresh title when layout options change
else
if
(
showingIcons
!==
this
.
tabOptions
.
showIcons
||
tabCloseButton
!==
this
.
tabOptions
.
tabCloseButton
||
tabSizing
!==
this
.
tabOptions
.
tabSizing
)
{
else
if
(
showingIcons
!==
this
.
tabOptions
.
showIcons
||
tabCloseButton
!==
this
.
tabOptions
.
tabCloseButton
||
tabSizing
!==
this
.
tabOptions
.
tabSizing
||
iconTheme
!==
this
.
tabOptions
.
iconTheme
)
{
titleControl
.
refresh
();
}
}
...
...
src/vs/workbench/browser/parts/editor/editorPart.ts
浏览文件 @
9fa09884
...
...
@@ -164,6 +164,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
tabCloseButton
:
editorConfig
.
tabCloseButton
,
tabSizing
:
editorConfig
.
tabSizing
,
labelFormat
:
editorConfig
.
labelFormat
,
iconTheme
:
config
.
workbench
.
iconTheme
};
this
.
revealIfOpen
=
editorConfig
.
revealIfOpen
;
...
...
@@ -175,6 +176,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
tabCloseButton
:
'
right
'
,
tabSizing
:
'
fit
'
,
labelFormat
:
'
default
'
,
iconTheme
:
'
vs-seti
'
};
this
.
revealIfOpen
=
false
;
...
...
@@ -207,7 +209,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
}
private
onConfigurationUpdated
(
event
:
IConfigurationChangeEvent
):
void
{
if
(
event
.
affectsConfiguration
(
'
workbench.editor
'
))
{
if
(
event
.
affectsConfiguration
(
'
workbench.editor
'
)
||
event
.
affectsConfiguration
(
'
workbench.iconTheme
'
)
)
{
const
configuration
=
this
.
configurationService
.
getValue
<
IWorkbenchEditorConfiguration
>
();
if
(
configuration
&&
configuration
.
workbench
&&
configuration
.
workbench
.
editor
)
{
const
editorConfig
=
configuration
.
workbench
.
editor
;
...
...
@@ -230,6 +232,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
tabSizing
:
editorConfig
.
tabSizing
,
showTabs
:
this
.
forceHideTabs
?
false
:
editorConfig
.
showTabs
,
labelFormat
:
editorConfig
.
labelFormat
,
iconTheme
:
configuration
.
workbench
.
iconTheme
};
if
(
!
this
.
doNotFireTabOptionsChanged
&&
!
objects
.
equals
(
oldTabOptions
,
this
.
tabOptions
))
{
...
...
src/vs/workbench/browser/parts/editor/media/tabstitle.css
浏览文件 @
9fa09884
...
...
@@ -45,6 +45,11 @@
padding-left
:
10px
;
}
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.tabs-container
>
.tab.sizing-shrink.has-icon-theme.close-button-right
,
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.tabs-container
>
.tab.sizing-shrink.has-icon-theme.close-button-off
{
padding-left
:
5px
;
/* reduce padding when we show icons and are in shrinking mode and tab close button is not left */
}
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.tabs-container
>
.tab.sizing-fit
{
width
:
120px
;
min-width
:
fit-content
;
...
...
@@ -160,11 +165,7 @@
/* No Tab Close Button */
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.tabs-container
>
.tab.close-button-off
{
padding-right
:
12px
;
/* give a little bit more room if close button is off... */
}
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.tabs-container
>
.tab.close-button-off.sizing-shrink
{
padding-right
:
0
;
/* ...but not when shrinking is enabled */
padding-right
:
10px
;
/* give a little bit more room if close button is off */
}
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.tabs-container
>
.tab.close-button-off.dirty
{
...
...
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
浏览文件 @
9fa09884
...
...
@@ -324,6 +324,12 @@ export class TabsTitleControl extends TitleControl {
domAction
(
tabContainer
,
`sizing-
${
option
}
`
);
});
if
(
tabOptions
.
showIcons
&&
!!
tabOptions
.
iconTheme
)
{
DOM
.
addClass
(
tabContainer
,
'
has-icon-theme
'
);
}
else
{
DOM
.
removeClass
(
tabContainer
,
'
has-icon-theme
'
);
}
// Label
const
tabLabel
=
this
.
editorLabels
[
index
];
tabLabel
.
setLabel
({
name
,
description
,
resource
:
toResource
(
editor
,
{
supportSideBySide
:
true
})
},
{
extraClasses
:
[
'
tab-label
'
],
italic
:
!
isPinned
});
...
...
src/vs/workbench/common/editor.ts
浏览文件 @
9fa09884
...
...
@@ -821,7 +821,8 @@ export interface IWorkbenchEditorConfiguration {
revealIfOpen
:
boolean
;
swipeToNavigate
:
boolean
,
labelFormat
:
'
default
'
|
'
short
'
|
'
medium
'
|
'
long
'
;
}
},
iconTheme
:
string
;
};
}
...
...
src/vs/workbench/services/group/common/groupService.ts
浏览文件 @
9fa09884
...
...
@@ -26,6 +26,7 @@ export interface IEditorTabOptions {
showIcons
?:
boolean
;
previewEditors
?:
boolean
;
labelFormat
?:
'
default
'
|
'
short
'
|
'
medium
'
|
'
long
'
;
iconTheme
?:
string
;
}
export
interface
IMoveOptions
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录