Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
66ab4c3c
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,发现更多精彩内容 >>
提交
66ab4c3c
编写于
11月 08, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
title - fix message list positioning
上级
610e1ca5
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
11 deletion
+21
-11
src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css
...s/workbench/browser/parts/titlebar/media/titlebarpart.css
+3
-5
src/vs/workbench/services/message/browser/media/messageList.css
.../workbench/services/message/browser/media/messageList.css
+0
-1
src/vs/workbench/services/message/browser/messageList.ts
src/vs/workbench/services/message/browser/messageList.ts
+17
-4
src/vs/workbench/services/message/electron-browser/messageService.ts
...bench/services/message/electron-browser/messageService.ts
+1
-1
未找到文件。
src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css
浏览文件 @
66ab4c3c
...
...
@@ -31,14 +31,12 @@
zoom
:
1
;
/* prevent zooming */
}
.titlebar-style-custom
.monaco-workbench.fullscreen
.quick-open-widget
,
.titlebar-style-custom
.global-message-list
{
.titlebar-style-custom
.monaco-workbench.fullscreen
.quick-open-widget
{
top
:
0
;
}
.titlebar-style-custom
.monaco-workbench
.quick-open-widget
,
.titlebar-style-custom
.global-message-list
{
top
:
22px
;
/* push down quick open and messages when we have a custom title bar */
.titlebar-style-custom
.monaco-workbench
.quick-open-widget
{
top
:
22px
;
/* push down quick open when we have a custom title bar */
}
/* Theming */
...
...
src/vs/workbench/services/message/browser/media/messageList.css
浏览文件 @
66ab4c3c
...
...
@@ -6,7 +6,6 @@
.global-message-list
{
font-size
:
12px
;
position
:
absolute
;
top
:
0
;
z-index
:
300
;
color
:
#eee
;
list-style-type
:
none
;
...
...
src/vs/workbench/services/message/browser/messageList.ts
浏览文件 @
66ab4c3c
...
...
@@ -10,6 +10,7 @@ import nls = require('vs/nls');
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
Builder
,
$
}
from
'
vs/base/browser/builder
'
;
import
DOM
=
require
(
'
vs/base/browser/dom
'
);
import
*
as
browser
from
'
vs/base/browser/browser
'
;
import
{
toErrorMessage
}
from
'
vs/base/common/errorMessage
'
;
import
aria
=
require
(
'
vs/base/browser/ui/aria/aria
'
);
import
types
=
require
(
'
vs/base/common/types
'
);
...
...
@@ -67,8 +68,6 @@ export class MessageList {
private
_onMessagesShowing
:
Emitter
<
void
>
;
private
_onMessagesCleared
:
Emitter
<
void
>
;
private
initialTopPosition
:
number
;
constructor
(
container
:
HTMLElement
,
usageLogger
?:
IUsageLogger
,
options
:
IMessageListOptions
=
{
purgeInterval
:
MessageList
.
DEFAULT_MESSAGE_PURGER_INTERVAL
,
maxMessages
:
MessageList
.
DEFAULT_MAX_MESSAGES
,
maxMessageLength
:
MessageList
.
DEFAULT_MAX_MESSAGE_LENGTH
})
{
this
.
messages
=
[];
this
.
messageListPurger
=
null
;
...
...
@@ -78,6 +77,12 @@ export class MessageList {
this
.
_onMessagesShowing
=
new
Emitter
<
void
>
();
this
.
_onMessagesCleared
=
new
Emitter
<
void
>
();
this
.
registerListeners
();
}
private
registerListeners
():
void
{
browser
.
onDidChangeFullscreen
(()
=>
this
.
positionMessageList
());
}
public
get
onMessagesShowing
():
Event
<
void
>
{
...
...
@@ -171,7 +176,6 @@ export class MessageList {
// Lazily create, otherwise clear old
if
(
!
this
.
messageListContainer
)
{
this
.
messageListContainer
=
$
(
'
.global-message-list
'
).
appendTo
(
container
);
this
.
initialTopPosition
=
parseInt
(
this
.
messageListContainer
.
getComputedStyle
().
getPropertyValue
(
'
top
'
),
10
)
||
0
;
}
else
{
$
(
this
.
messageListContainer
).
empty
();
$
(
this
.
messageListContainer
).
removeClass
(
'
transition
'
);
...
...
@@ -199,12 +203,21 @@ export class MessageList {
if
(
animate
)
{
setTimeout
(()
=>
{
$
(
this
.
messageListContainer
).
addClass
(
'
transition
'
);
$
(
this
.
messageListContainer
).
style
(
'
top
'
,
`
${
this
.
initialTopPosition
}
px`
);
this
.
positionMessageList
(
);
},
50
/* Need this delay to reliably get the animation on some browsers */
);
}
});
}
private
positionMessageList
():
void
{
let
position
=
0
;
if
(
!
browser
.
isFullscreen
()
&&
DOM
.
hasClass
(
this
.
container
,
'
titlebar-style-custom
'
))
{
position
=
22
/
browser
.
getZoomFactor
();
// adjust the position based on title bar size and zoom factor
}
$
(
this
.
messageListContainer
).
style
(
'
top
'
,
`
${
position
}
px`
);
}
private
renderMessage
(
message
:
IMessageEntry
,
container
:
Builder
,
total
:
number
,
delta
:
number
):
void
{
container
.
li
({
class
:
'
message-list-entry message-list-entry-with-action
'
},
(
li
)
=>
{
...
...
src/vs/workbench/services/message/electron-browser/messageService.ts
浏览文件 @
66ab4c3c
...
...
@@ -54,7 +54,7 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe
return
result
===
0
?
true
:
false
;
}
choose
(
severity
:
Severity
,
message
:
string
,
options
:
string
[],
modal
:
boolean
=
false
):
TPromise
<
number
>
{
public
choose
(
severity
:
Severity
,
message
:
string
,
options
:
string
[],
modal
:
boolean
=
false
):
TPromise
<
number
>
{
if
(
modal
)
{
const
type
:
'
none
'
|
'
info
'
|
'
error
'
|
'
question
'
|
'
warning
'
=
severity
===
Severity
.
Info
?
'
question
'
:
severity
===
Severity
.
Error
?
'
error
'
:
severity
===
Severity
.
Warning
?
'
warning
'
:
'
none
'
;
return
TPromise
.
wrap
(
this
.
showMessageBox
({
message
,
buttons
:
options
,
type
}));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录