Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9f5688ea
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,发现更多精彩内容 >>
提交
9f5688ea
编写于
2月 15, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
notifications - introduce theming
上级
0ce36cb2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
71 deletion
+34
-71
build/lib/i18n.resources.json
build/lib/i18n.resources.json
+0
-4
src/vs/workbench/browser/parts/notifications/media/notificationsCenter.css
...browser/parts/notifications/media/notificationsCenter.css
+0
-2
src/vs/workbench/browser/parts/notifications/notificationsCenter.ts
...kbench/browser/parts/notifications/notificationsCenter.ts
+14
-3
src/vs/workbench/common/theme.ts
src/vs/workbench/common/theme.ts
+20
-62
未找到文件。
build/lib/i18n.resources.json
浏览文件 @
9f5688ea
...
...
@@ -170,10 +170,6 @@
"name"
:
"vs/workbench/services/mode"
,
"project"
:
"vscode-workbench"
},
{
"name"
:
"vs/workbench/services/notification"
,
"project"
:
"vscode-workbench"
},
{
"name"
:
"vs/workbench/services/progress"
,
"project"
:
"vscode-workbench"
...
...
src/vs/workbench/browser/parts/notifications/media/notificationsCenter.css
浏览文件 @
9f5688ea
...
...
@@ -10,7 +10,6 @@
right
:
8px
;
bottom
:
30px
;
/* above status bar */
display
:
none
;
background
:
#323232
;
/* TODO@notification make themable */
overflow
:
hidden
;
}
...
...
@@ -31,7 +30,6 @@
padding
:
10px
5px
;
height
:
100%
;
box-sizing
:
border-box
;
border-bottom
:
1px
solid
#1E1E1E
;
}
/** Notification: Main Row */
...
...
src/vs/workbench/browser/parts/notifications/notificationsCenter.ts
浏览文件 @
9f5688ea
...
...
@@ -11,9 +11,9 @@ import { WorkbenchList } from 'vs/platform/list/browser/listService';
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IListOptions
}
from
'
vs/base/browser/ui/list/listWidget
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
Themable
}
from
'
vs/workbench/common/theme
'
;
import
{
Themable
,
NOTIFICATIONS_BORDER
,
NOTIFICATIONS_LINKS
,
NOTIFICATIONS_BACKGROUND
,
NOTIFICATIONS_FOREGROUND
}
from
'
vs/workbench/common/theme
'
;
import
{
IThemeService
,
registerThemingParticipant
,
ITheme
,
ICssStyleCollector
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
contrastBorder
,
widgetShadow
,
textLinkForeground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
contrastBorder
,
widgetShadow
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
INotificationViewItem
,
INotificationsModel
,
INotificationChangeEvent
,
NotificationChangeType
}
from
'
vs/workbench/common/notifications
'
;
import
{
NotificationsListDelegate
,
NotificationRenderer
}
from
'
vs/workbench/browser/parts/notifications/notificationsViewer
'
;
import
{
NotificationActionRunner
}
from
'
vs/workbench/browser/parts/notifications/notificationsActions
'
;
...
...
@@ -184,6 +184,12 @@ export class NotificationsCenter extends Themable {
protected
updateStyles
():
void
{
if
(
this
.
listContainer
)
{
const
foreground
=
this
.
getColor
(
NOTIFICATIONS_FOREGROUND
);
this
.
listContainer
.
style
.
color
=
foreground
?
foreground
.
toString
()
:
null
;
const
background
=
this
.
getColor
(
NOTIFICATIONS_BACKGROUND
);
this
.
listContainer
.
style
.
background
=
background
?
background
.
toString
()
:
null
;
const
outlineColor
=
this
.
getColor
(
contrastBorder
);
this
.
listContainer
.
style
.
outlineColor
=
outlineColor
?
outlineColor
.
toString
()
:
null
;
...
...
@@ -238,8 +244,13 @@ export class NotificationsCenter extends Themable {
}
registerThemingParticipant
((
theme
:
ITheme
,
collector
:
ICssStyleCollector
)
=>
{
const
linkColor
=
theme
.
getColor
(
textLinkForeground
);
const
linkColor
=
theme
.
getColor
(
NOTIFICATIONS_LINKS
);
if
(
linkColor
)
{
collector
.
addRule
(
`.monaco-workbench > .notifications-list-container .notification-list-item .notification-list-item-message a { color:
${
linkColor
}
; }`
);
}
const
notificationBorderColor
=
theme
.
getColor
(
NOTIFICATIONS_BORDER
);
if
(
notificationBorderColor
)
{
collector
.
addRule
(
`.monaco-workbench > .notifications-list-container .notification-list-item { border-bottom: 1px solid
${
notificationBorderColor
}
; }`
);
}
});
src/vs/workbench/common/theme.ts
浏览文件 @
9f5688ea
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
nls
=
require
(
'
vs/nls
'
);
import
{
registerColor
,
editorBackground
,
contrastBorder
,
transparent
,
lighten
,
darken
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
registerColor
,
editorBackground
,
contrastBorder
,
transparent
,
editorWidgetBackground
,
textLinkForeground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
IDisposable
,
Disposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IThemeService
,
ITheme
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
...
...
@@ -366,71 +366,29 @@ export const TITLE_BAR_BORDER = registerColor('titleBar.border', {
// < --- Notifications --- >
export
const
NOTIFICATIONS_FOREGROUND
=
registerColor
(
'
notification.foreground
'
,
{
dark
:
'
#EEEEEE
'
,
light
:
'
#EEEEEE
'
,
hc
:
'
#FFFFFF
'
},
nls
.
localize
(
'
notificationsForeground
'
,
"
Notifications foreground color. Notifications slide in from the top of the window.
"
));
export
const
NOTIFICATIONS_BACKGROUND
=
registerColor
(
'
notification.background
'
,
{
dark
:
'
#333333
'
,
light
:
'
#2C2C2C
'
,
hc
:
'
#000000
'
},
nls
.
localize
(
'
notificationsBackground
'
,
"
Notifications background color. Notifications slide in from the top of the window.
"
));
export
const
NOTIFICATIONS_BUTTON_BACKGROUND
=
registerColor
(
'
notification.buttonBackground
'
,
{
dark
:
'
#0E639C
'
,
light
:
'
#007ACC
'
,
hc
:
null
},
nls
.
localize
(
'
notificationsButtonBackground
'
,
"
Notifications button background color. Notifications slide in from the top of the window.
"
));
export
const
NOTIFICATIONS_BUTTON_HOVER_BACKGROUND
=
registerColor
(
'
notification.buttonHoverBackground
'
,
{
dark
:
lighten
(
NOTIFICATIONS_BUTTON_BACKGROUND
,
0.2
),
light
:
darken
(
NOTIFICATIONS_BUTTON_BACKGROUND
,
0.2
),
hc
:
null
},
nls
.
localize
(
'
notificationsButtonHoverBackground
'
,
"
Notifications button background color when hovering. Notifications slide in from the top of the window.
"
));
export
const
NOTIFICATIONS_BUTTON_FOREGROUND
=
registerColor
(
'
notification.buttonForeground
'
,
{
dark
:
Color
.
white
,
light
:
Color
.
white
,
hc
:
Color
.
white
},
nls
.
localize
(
'
notificationsButtonForeground
'
,
"
Notifications button foreground color. Notifications slide in from the top of the window.
"
));
export
const
NOTIFICATIONS_INFO_BACKGROUND
=
registerColor
(
'
notification.infoBackground
'
,
{
dark
:
'
#007acc
'
,
light
:
'
#007acc
'
,
hc
:
contrastBorder
},
nls
.
localize
(
'
notificationsInfoBackground
'
,
"
Notifications info background color. Notifications slide in from the top of the window.
"
));
export
const
NOTIFICATIONS_INFO_FOREGROUND
=
registerColor
(
'
notification.infoForeground
'
,
{
dark
:
NOTIFICATIONS_FOREGROUND
,
light
:
NOTIFICATIONS_FOREGROUND
,
export
const
NOTIFICATIONS_FOREGROUND
=
registerColor
(
'
notifications.foreground
'
,
{
dark
:
null
,
light
:
null
,
hc
:
null
},
nls
.
localize
(
'
notifications
InfoForeground
'
,
"
Notifications info foreground color. Notifications slide in from the top
of the window.
"
));
},
nls
.
localize
(
'
notifications
Foreground
'
,
"
Notifications foreground color. Notifications slide in from the bottom right
of the window.
"
));
export
const
NOTIFICATIONS_
WARNING_BACKGROUND
=
registerColor
(
'
notification.warningB
ackground
'
,
{
dark
:
'
#B89500
'
,
light
:
'
#B89500
'
,
hc
:
contrastBorder
},
nls
.
localize
(
'
notifications
WarningBackground
'
,
"
Notifications warning background color. Notifications slide in from the top
of the window.
"
));
export
const
NOTIFICATIONS_
BACKGROUND
=
registerColor
(
'
notifications.b
ackground
'
,
{
dark
:
editorWidgetBackground
,
light
:
editorWidgetBackground
,
hc
:
editorWidgetBackground
},
nls
.
localize
(
'
notifications
Background
'
,
"
Notifications background color. Notifications slide in from the bottom right
of the window.
"
));
export
const
NOTIFICATIONS_WARNING_FOREGROUND
=
registerColor
(
'
notification.warningForeground
'
,
{
dark
:
NOTIFICATIONS_FOREGROUND
,
light
:
NOTIFICATIONS_FOREGROUND
,
hc
:
null
},
nls
.
localize
(
'
notificationsWarningForeground
'
,
"
Notifications warning foreground color. Notifications slide in from the top of the window.
"
));
export
const
NOTIFICATIONS_ERROR_BACKGROUND
=
registerColor
(
'
notification.errorBackground
'
,
{
dark
:
'
#BE1100
'
,
light
:
'
#BE1100
'
,
hc
:
contrastBorder
},
nls
.
localize
(
'
notificationsErrorBackground
'
,
"
Notifications error background color. Notifications slide in from the top of the window.
"
));
export
const
NOTIFICATIONS_BORDER
=
registerColor
(
'
notifications.border
'
,
{
dark
:
editorBackground
,
light
:
editorBackground
,
hc
:
editorBackground
},
nls
.
localize
(
'
notificationsBorder
'
,
"
Notifications border color. Notifications slide in from the bottom right of the window.
"
));
export
const
NOTIFICATIONS_
ERROR_FOREGROUND
=
registerColor
(
'
notification.errorF
oreground
'
,
{
dark
:
NOTIFICATIONS_FOREGROUND
,
light
:
NOTIFICATIONS_FOREGROUND
,
hc
:
null
},
nls
.
localize
(
'
notifications
ErrorForeground
'
,
"
Notifications error foreground color. Notifications slide in from the top
of the window.
"
));
export
const
NOTIFICATIONS_
LINKS
=
registerColor
(
'
notificationLink.f
oreground
'
,
{
dark
:
textLinkForeground
,
light
:
textLinkForeground
,
hc
:
textLinkForeground
},
nls
.
localize
(
'
notifications
Link
'
,
"
Notification links foreground color. Notifications slide in from the bottom right
of the window.
"
));
/**
* Base class for all themable workbench components.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录