Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
39b04334
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,发现更多精彩内容 >>
提交
39b04334
编写于
9月 13, 2018
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up: Panel provides backgrond and foreground and Activity bar provides foreground
上级
1cc6bbf0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
26 deletion
+27
-26
src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
...workbench/browser/parts/activitybar/activitybarActions.ts
+3
-3
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
...vs/workbench/browser/parts/activitybar/activitybarPart.ts
+4
-3
src/vs/workbench/browser/parts/compositeBarActions.ts
src/vs/workbench/browser/parts/compositeBarActions.ts
+13
-4
src/vs/workbench/browser/parts/panel/panelPart.ts
src/vs/workbench/browser/parts/panel/panelPart.ts
+7
-16
未找到文件。
src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
浏览文件 @
39b04334
...
...
@@ -193,13 +193,13 @@ export class PlaceHolderToggleCompositePinnedAction extends ToggleCompositePinne
registerThemingParticipant
((
theme
:
ITheme
,
collector
:
ICssStyleCollector
)
=>
{
const
active
Back
groundColor
=
theme
.
getColor
(
ACTIVITY_BAR_FOREGROUND
);
if
(
active
Back
groundColor
)
{
const
active
Fore
groundColor
=
theme
.
getColor
(
ACTIVITY_BAR_FOREGROUND
);
if
(
active
Fore
groundColor
)
{
collector
.
addRule
(
`
.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active .action-label,
.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus .action-label,
.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover .action-label {
background-color:
${
active
Back
groundColor
}
!important;
background-color:
${
active
Fore
groundColor
}
!important;
}
`
);
}
...
...
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
浏览文件 @
39b04334
...
...
@@ -202,11 +202,12 @@ export class ActivitybarPart extends Part {
private
getActivitybarItemColors
(
theme
:
ITheme
):
ICompositeBarColors
{
return
<
ICompositeBarColors
>
{
backgroundColor
:
theme
.
defines
(
ACTIVITY_BAR_INACTIVE_FOREGROUND
)
?
theme
.
getColor
(
ACTIVITY_BAR_INACTIVE_FOREGROUND
)
:
theme
.
getColor
(
ACTIVITY_BAR_FOREGROUND
).
transparent
(
0.6
),
activeBackgroundColor
:
theme
.
getColor
(
ACTIVITY_BAR_FOREGROUND
),
activeForegroundColor
:
theme
.
getColor
(
ACTIVITY_BAR_FOREGROUND
),
inactiveForegroundColor
:
theme
.
defines
(
ACTIVITY_BAR_INACTIVE_FOREGROUND
)
?
theme
.
getColor
(
ACTIVITY_BAR_INACTIVE_FOREGROUND
)
:
theme
.
getColor
(
ACTIVITY_BAR_FOREGROUND
).
transparent
(
0.6
),
badgeBackground
:
theme
.
getColor
(
ACTIVITY_BAR_BADGE_BACKGROUND
),
badgeForeground
:
theme
.
getColor
(
ACTIVITY_BAR_BADGE_FOREGROUND
),
dragAndDropBackground
:
theme
.
getColor
(
ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND
)
dragAndDropBackground
:
theme
.
getColor
(
ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND
),
backgroundColor
:
null
,
activeBorderBottomColor
:
null
,
};
}
...
...
src/vs/workbench/browser/parts/compositeBarActions.ts
浏览文件 @
39b04334
...
...
@@ -114,7 +114,9 @@ export class ActivityAction extends Action {
export
interface
ICompositeBarColors
{
backgroundColor
:
Color
;
activeBackgroundColor
:
Color
;
activeBorderBottomColor
:
Color
;
activeForegroundColor
:
Color
;
inactiveForegroundColor
:
Color
;
badgeBackground
:
Color
;
badgeForeground
:
Color
;
dragAndDropBackground
:
Color
;
...
...
@@ -154,10 +156,17 @@ export class ActivityActionItem extends BaseActionItem {
protected
updateStyles
():
void
{
const
theme
=
this
.
themeService
.
getTheme
();
const
colors
=
this
.
options
.
colors
(
theme
);
// Label
if
(
this
.
label
&&
this
.
options
.
icon
)
{
const
background
=
this
.
_action
.
checked
?
colors
.
activeBackgroundColor
:
colors
.
backgroundColor
;
if
(
this
.
options
.
icon
)
{
const
foreground
=
this
.
_action
.
checked
?
colors
.
activeForegroundColor
:
colors
.
inactiveForegroundColor
;
this
.
label
.
style
.
backgroundColor
=
foreground
?
foreground
.
toString
()
:
null
;
}
else
if
(
this
.
label
)
{
const
background
=
colors
.
backgroundColor
;
const
foreground
=
this
.
_action
.
checked
?
colors
.
activeForegroundColor
:
colors
.
inactiveForegroundColor
;
const
borderBottomColor
=
this
.
_action
.
checked
?
colors
.
activeBorderBottomColor
:
null
;
this
.
label
.
style
.
backgroundColor
=
background
?
background
.
toString
()
:
null
;
this
.
label
.
style
.
color
=
foreground
?
foreground
.
toString
()
:
null
;
this
.
label
.
style
.
borderBottomColor
=
borderBottomColor
?
borderBottomColor
.
toString
()
:
null
;
}
// Badge
...
...
src/vs/workbench/browser/parts/panel/panelPart.ts
浏览文件 @
39b04334
...
...
@@ -96,7 +96,9 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
overflowActionSize
:
44
,
colors
:
theme
=>
({
backgroundColor
:
theme
.
getColor
(
PANEL_BACKGROUND
),
activeBackgroundColor
:
theme
.
getColor
(
PANEL_BACKGROUND
),
activeBorderBottomColor
:
theme
.
getColor
(
PANEL_ACTIVE_TITLE_BORDER
),
activeForegroundColor
:
theme
.
getColor
(
PANEL_ACTIVE_TITLE_FOREGROUND
),
inactiveForegroundColor
:
theme
.
getColor
(
PANEL_INACTIVE_TITLE_FOREGROUND
),
badgeBackground
:
theme
.
getColor
(
badgeBackground
),
badgeForeground
:
theme
.
getColor
(
badgeForeground
),
dragAndDropBackground
:
theme
.
getColor
(
PANEL_DRAG_AND_DROP_BACKGROUND
)
...
...
@@ -321,20 +323,9 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
const
titleActiveBorder
=
theme
.
getColor
(
PANEL_ACTIVE_TITLE_BORDER
);
if
(
titleActive
||
titleActiveBorder
)
{
collector
.
addRule
(
`
.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label,
.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item.checked .action-label {
color:
${
titleActive
}
;
border-bottom-color:
${
titleActiveBorder
}
;
}
`
);
}
// Title Inactive
const
titleInactive
=
theme
.
getColor
(
PANEL_INACTIVE_TITLE_FOREGROUND
);
if
(
titleInactive
)
{
collector
.
addRule
(
`
.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label {
color:
${
titleInactive
}
;
.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label {
color:
${
titleActive
}
!important;
border-bottom-color:
${
titleActiveBorder
}
!important;
}
`
);
}
...
...
@@ -344,7 +335,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
if
(
focusBorderColor
)
{
collector
.
addRule
(
`
.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:focus .action-label {
color:
${
titleActive
}
;
color:
${
titleActive
}
!important
;
border-bottom-color:
${
focusBorderColor
}
!important;
border-bottom: 1px solid;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录