Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
53f524a5
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
53f524a5
编写于
9月 21, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
no tabs: dirty over close action
上级
07af5660
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
41 deletion
+17
-41
src/vs/workbench/browser/parts/editor/media/notabstitle.css
src/vs/workbench/browser/parts/editor/media/notabstitle.css
+10
-28
src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts
src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts
+7
-13
未找到文件。
src/vs/workbench/browser/parts/editor/media/notabstitle.css
浏览文件 @
53f524a5
...
...
@@ -3,33 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/* Title Decoration */
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.title-decoration
{
width
:
18px
;
padding-left
:
2px
;
opacity
:
0.5
;
}
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title.active
.title-decoration
{
opacity
:
1
;
}
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.title-decoration.dirty
{
background-size
:
16px
;
background-position
:
left
center
;
background-repeat
:
no-repeat
;
}
.vs
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.title-decoration.dirty
{
background
:
url('close-dirty.svg')
center
center
no-repeat
;
}
.hc-black
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.title-decoration.dirty
,
.vs-dark
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.title-decoration.dirty
{
background
:
url('close-dirty-inverse.svg')
center
center
no-repeat
;
}
/* Title Label */
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.title-label
{
...
...
@@ -37,7 +10,7 @@
overflow
:
hidden
;
text-overflow
:
ellipsis
;
position
:
relative
;
padding-left
:
2px
;
padding-left
:
2
0
px
;
}
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title
.monaco-icon-label
::before
{
...
...
@@ -53,4 +26,13 @@
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title.active
.title-actions
{
opacity
:
1
;
}
.vs
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title.dirty
.title-actions
.close-editor-action
{
background
:
url('close-dirty.svg')
center
center
no-repeat
;
}
.vs-dark
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title.dirty
.title-actions
.close-editor-action
,
.hc-black
.monaco-workbench
>
.part.editor
>
.content
>
.one-editor-silo
>
.container
>
.title.dirty
.title-actions
.close-editor-action
{
background
:
url('close-dirty-inverse.svg')
center
center
no-repeat
;
}
\ No newline at end of file
src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts
浏览文件 @
53f524a5
...
...
@@ -14,7 +14,6 @@ import {EditorLabel} from 'vs/workbench/browser/labels';
export
class
NoTabsTitleControl
extends
TitleControl
{
private
titleContainer
:
HTMLElement
;
private
titleDecoration
:
HTMLElement
;
private
editorLabel
:
EditorLabel
;
public
setContext
(
group
:
IEditorGroup
):
void
{
...
...
@@ -34,11 +33,6 @@ export class NoTabsTitleControl extends TitleControl {
// Detect mouse click
this
.
toDispose
.
push
(
DOM
.
addDisposableListener
(
this
.
titleContainer
,
DOM
.
EventType
.
MOUSE_UP
,
(
e
:
MouseEvent
)
=>
this
.
onTitleClick
(
e
)));
// Left Title Decoration
this
.
titleDecoration
=
document
.
createElement
(
'
div
'
);
DOM
.
addClass
(
this
.
titleDecoration
,
'
title-decoration
'
);
this
.
titleContainer
.
appendChild
(
this
.
titleDecoration
);
// Editor Label
this
.
editorLabel
=
this
.
instantiationService
.
createInstance
(
EditorLabel
,
this
.
titleContainer
,
void
0
);
this
.
toDispose
.
push
(
this
.
editorLabel
);
...
...
@@ -114,6 +108,13 @@ export class NoTabsTitleControl extends TitleControl {
DOM
.
removeClass
(
this
.
titleContainer
,
'
active
'
);
}
// Dirty state
if
(
editor
.
isDirty
())
{
DOM
.
addClass
(
this
.
titleContainer
,
'
dirty
'
);
}
else
{
DOM
.
removeClass
(
this
.
titleContainer
,
'
dirty
'
);
}
// Editor Label
const
resource
=
getResource
(
editor
);
const
name
=
editor
.
getName
()
||
''
;
...
...
@@ -125,13 +126,6 @@ export class NoTabsTitleControl extends TitleControl {
this
.
editorLabel
.
setLabel
({
name
,
description
,
resource
},
{
title
:
verboseDescription
,
italic
:
!
isPinned
,
extraClasses
:
[
'
title-label
'
]
});
// Editor Decoration
if
(
editor
.
isDirty
())
{
DOM
.
addClass
(
this
.
titleDecoration
,
'
dirty
'
);
}
else
{
DOM
.
removeClass
(
this
.
titleDecoration
,
'
dirty
'
);
}
// Update Editor Actions Toolbar
this
.
updateEditorActionsToolbar
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录