Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
32018e28
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
32018e28
编写于
2月 15, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
notifications - better status bar alignment
上级
f208dc52
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
22 addition
and
14 deletion
+22
-14
extensions/typescript/src/utils/projectStatus.ts
extensions/typescript/src/utils/projectStatus.ts
+1
-1
extensions/typescript/src/utils/versionStatus.ts
extensions/typescript/src/utils/versionStatus.ts
+1
-1
src/vs/platform/statusbar/common/statusbar.ts
src/vs/platform/statusbar/common/statusbar.ts
+5
-0
src/vs/workbench/browser/parts/editor/editor.contribution.ts
src/vs/workbench/browser/parts/editor/editor.contribution.ts
+1
-1
src/vs/workbench/browser/parts/editor/resourceViewer.ts
src/vs/workbench/browser/parts/editor/resourceViewer.ts
+1
-1
src/vs/workbench/browser/parts/notifications/notificationsStatus.ts
...kbench/browser/parts/notifications/notificationsStatus.ts
+1
-1
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
+11
-8
src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.ts
.../parts/feedback/electron-browser/feedback.contribution.ts
+1
-1
未找到文件。
extensions/typescript/src/utils/projectStatus.ts
浏览文件 @
32018e28
...
...
@@ -33,7 +33,7 @@ class ExcludeHintItem {
constructor
(
private
readonly
telemetryReporter
:
TelemetryReporter
)
{
this
.
_item
=
vscode
.
window
.
createStatusBarItem
(
vscode
.
StatusBarAlignment
.
Right
,
Number
.
MIN_VALUE
);
this
.
_item
=
vscode
.
window
.
createStatusBarItem
(
vscode
.
StatusBarAlignment
.
Right
,
98
/* to the right of typescript version status (99) */
);
this
.
_item
.
command
=
'
js.projectStatus.command
'
;
}
...
...
extensions/typescript/src/utils/versionStatus.ts
浏览文件 @
32018e28
...
...
@@ -14,7 +14,7 @@ export default class VersionStatus {
constructor
(
private
readonly
normalizePath
:
(
resource
:
vscode
.
Uri
)
=>
string
|
null
)
{
this
.
versionBarEntry
=
vscode
.
window
.
createStatusBarItem
(
vscode
.
StatusBarAlignment
.
Right
,
Number
.
MIN_VALUE
);
this
.
versionBarEntry
=
vscode
.
window
.
createStatusBarItem
(
vscode
.
StatusBarAlignment
.
Right
,
99
/* to the right of editor status (100) */
);
this
.
onChangeEditorSub
=
vscode
.
window
.
onDidChangeActiveTextEditor
(
this
.
showHideStatus
,
this
);
}
...
...
src/vs/platform/statusbar/common/statusbar.ts
浏览文件 @
32018e28
...
...
@@ -51,6 +51,11 @@ export interface IStatusbarEntry {
* An optional extension ID if this entry is provided from an extension.
*/
extensionId
?:
string
;
/**
* An optional CSS class for the status bar item.
*/
class
?:
string
;
}
export
interface
IStatusbarService
{
...
...
src/vs/workbench/browser/parts/editor/editor.contribution.ts
浏览文件 @
32018e28
...
...
@@ -209,7 +209,7 @@ Registry.as<IEditorInputFactoryRegistry>(EditorInputExtensions.EditorInputFactor
// Register Editor Status
const
statusBar
=
Registry
.
as
<
IStatusbarRegistry
>
(
StatusExtensions
.
Statusbar
);
statusBar
.
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
EditorStatus
,
StatusbarAlignment
.
RIGHT
,
100
/*
High Priority
*/
));
statusBar
.
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
EditorStatus
,
StatusbarAlignment
.
RIGHT
,
100
/*
towards the left of the right hand side
*/
));
// Register Status Actions
const
registry
=
Registry
.
as
<
IWorkbenchActionRegistry
>
(
ActionExtensions
.
WorkbenchActions
);
...
...
src/vs/workbench/browser/parts/editor/resourceViewer.ts
浏览文件 @
32018e28
...
...
@@ -322,7 +322,7 @@ class ZoomStatusbarItem extends Themable implements IStatusbarItem {
}
Registry
.
as
<
IStatusbarRegistry
>
(
Extensions
.
Statusbar
).
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
ZoomStatusbarItem
,
StatusbarAlignment
.
RIGHT
,
101
)
new
StatusbarItemDescriptor
(
ZoomStatusbarItem
,
StatusbarAlignment
.
RIGHT
,
101
/* to the left of editor status (100) */
)
);
interface
ImageState
{
...
...
src/vs/workbench/browser/parts/notifications/notificationsStatus.ts
浏览文件 @
32018e28
...
...
@@ -50,7 +50,7 @@ export class NotificationsStatus {
text
:
`$(megaphone)
${
notificationsCount
}
`
,
command
:
TOGGLE_NOTFICATIONS_CENTER_COMMAND_ID
,
tooltip
:
localize
(
'
notifications
'
,
"
{0} notifications
"
,
notificationsCount
)
},
StatusbarAlignment
.
RIGHT
,
Number
.
MIN_VALUE
);
},
StatusbarAlignment
.
RIGHT
,
-
1000
/* towards the far end of the right hand side */
);
}
}
...
...
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
浏览文件 @
32018e28
...
...
@@ -6,7 +6,6 @@
'
use strict
'
;
import
'
vs/css!./media/statusbarpart
'
;
import
dom
=
require
(
'
vs/base/browser/dom
'
);
import
nls
=
require
(
'
vs/nls
'
);
import
{
toErrorMessage
}
from
'
vs/base/common/errorMessage
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
...
...
@@ -31,6 +30,7 @@ import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/
import
{
contrastBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
isThemeColor
}
from
'
vs/editor/common/editorCommon
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
import
{
addClass
,
EventHelper
}
from
'
vs/base/browser/dom
'
;
export
class
StatusbarPart
extends
Part
implements
IStatusbarService
{
...
...
@@ -151,12 +151,12 @@ export class StatusbarPart extends Part implements IStatusbarService {
private
doCreateStatusItem
(
alignment
:
StatusbarAlignment
,
priority
:
number
=
0
):
HTMLElement
{
const
el
=
document
.
createElement
(
'
div
'
);
dom
.
addClass
(
el
,
'
statusbar-item
'
);
addClass
(
el
,
'
statusbar-item
'
);
if
(
alignment
===
StatusbarAlignment
.
RIGHT
)
{
dom
.
addClass
(
el
,
'
right
'
);
addClass
(
el
,
'
right
'
);
}
else
{
dom
.
addClass
(
el
,
'
left
'
);
addClass
(
el
,
'
left
'
);
}
$
(
el
).
setProperty
(
StatusbarPart
.
PRIORITY_PROP
,
priority
);
...
...
@@ -206,10 +206,9 @@ export class StatusbarPart extends Part implements IStatusbarService {
let
manageExtensionAction
:
ManageExtensionAction
;
class
StatusBarEntryItem
implements
IStatusbarItem
{
private
entry
:
IStatusbarEntry
;
constructor
(
entry
:
IStatusbarEntry
,
private
entry
:
IStatusbarEntry
,
@
ICommandService
private
commandService
:
ICommandService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IMessageService
private
messageService
:
IMessageService
,
...
...
@@ -227,7 +226,11 @@ class StatusBarEntryItem implements IStatusbarItem {
public
render
(
el
:
HTMLElement
):
IDisposable
{
let
toDispose
:
IDisposable
[]
=
[];
dom
.
addClass
(
el
,
'
statusbar-entry
'
);
addClass
(
el
,
'
statusbar-entry
'
);
if
(
this
.
entry
.
class
)
{
addClass
(
el
,
this
.
entry
.
class
);
}
// Text Container
let
textContainer
:
HTMLElement
;
...
...
@@ -264,7 +267,7 @@ class StatusBarEntryItem implements IStatusbarItem {
// Context Menu
if
(
this
.
entry
.
extensionId
)
{
$
(
textContainer
).
on
(
'
contextmenu
'
,
e
=>
{
dom
.
EventHelper
.
stop
(
e
,
true
);
EventHelper
.
stop
(
e
,
true
);
this
.
contextMenuService
.
showContextMenu
({
getAnchor
:
()
=>
el
,
...
...
src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.ts
浏览文件 @
32018e28
...
...
@@ -14,7 +14,7 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v
Registry
.
as
<
IStatusbarRegistry
>
(
Extensions
.
Statusbar
).
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
FeedbackStatusbarItem
,
StatusbarAlignment
.
RIGHT
,
-
100
/*
Low Priority
*/
-
100
/*
towards the end of the right hand side
*/
));
// Configuration: Workbench
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录