Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
f9943ec2
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
f9943ec2
编写于
10月 26, 2021
作者:
S
SteVen Batten
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
improve theming for #134196
上级
11d8b592
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
46 addition
and
6 deletion
+46
-6
src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts
.../workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts
+27
-3
src/vs/workbench/browser/parts/panel/panelPart.ts
src/vs/workbench/browser/parts/panel/panelPart.ts
+19
-3
未找到文件。
src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts
浏览文件 @
f9943ec2
...
...
@@ -12,19 +12,20 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IStorageService
}
from
'
vs/platform/storage/common/storage
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
activeContrastBorder
,
editorBackground
,
focusBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
activeContrastBorder
,
contrastBorder
,
editorBackground
,
focusBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
IThemeService
,
registerThemingParticipant
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
Extensions
as
PaneCompositeExtensions
}
from
'
vs/workbench/browser/panecomposite
'
;
import
{
BasePanelPart
}
from
'
vs/workbench/browser/parts/panel/panelPart
'
;
import
{
ActiveAuxiliaryContext
,
AuxiliaryBarFocusContext
}
from
'
vs/workbench/common/auxiliarybar
'
;
import
{
SIDE_BAR_BACKGROUND
,
SIDE_BAR_TITLE_FOREGROUND
}
from
'
vs/workbench/common/theme
'
;
import
{
SIDE_BAR_BACKGROUND
,
SIDE_BAR_
BORDER
,
SIDE_BAR_
TITLE_FOREGROUND
}
from
'
vs/workbench/common/theme
'
;
import
{
IViewDescriptorService
,
ViewContainerLocation
}
from
'
vs/workbench/common/views
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
IWorkbenchLayoutService
,
Parts
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
import
{
IWorkbenchLayoutService
,
Parts
,
Position
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
import
{
IActivityHoverOptions
}
from
'
vs/workbench/browser/parts/compositeBarActions
'
;
import
{
HoverPosition
}
from
'
vs/base/browser/ui/hover/hoverWidget
'
;
import
{
IAction
,
Separator
}
from
'
vs/base/common/actions
'
;
import
{
ToggleAuxiliaryBarAction
}
from
'
vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions
'
;
import
{
assertIsDefined
}
from
'
vs/base/common/types
'
;
export
class
AuxiliaryBarPart
extends
BasePanelPart
{
static
readonly
activePanelSettingsKey
=
'
workbench.auxiliarybar.activepanelid
'
;
...
...
@@ -60,6 +61,7 @@ export class AuxiliaryBarPart extends BasePanelPart {
ViewContainerLocation
.
AuxiliaryBar
,
ActiveAuxiliaryContext
.
bindTo
(
contextKeyService
),
AuxiliaryBarFocusContext
.
bindTo
(
contextKeyService
),
()
=>
(
this
.
getColor
(
SIDE_BAR_BORDER
)
||
this
.
getColor
(
contrastBorder
))
?
1
:
0
,
notificationService
,
storageService
,
telemetryService
,
...
...
@@ -74,6 +76,28 @@ export class AuxiliaryBarPart extends BasePanelPart {
);
}
// override layout(width: number, height: number, top: number, left: number): void {
// // Layout contents
// super.layout(width, height, top, left); // Take into account the 1px border when layouting
// }
override
updateStyles
():
void
{
super
.
updateStyles
();
const
container
=
assertIsDefined
(
this
.
getContainer
());
const
borderColor
=
this
.
getColor
(
SIDE_BAR_BORDER
)
||
this
.
getColor
(
contrastBorder
);
const
isPositionLeft
=
this
.
layoutService
.
getSideBarPosition
()
===
Position
.
RIGHT
;
container
.
style
.
borderLeftColor
=
borderColor
??
''
;
container
.
style
.
borderRightColor
=
borderColor
??
''
;
container
.
style
.
borderLeftStyle
=
borderColor
&&
!
isPositionLeft
?
'
solid
'
:
'
none
'
;
container
.
style
.
borderRightStyle
=
borderColor
&&
isPositionLeft
?
'
solid
'
:
'
none
'
;
container
.
style
.
borderLeftWidth
=
borderColor
&&
!
isPositionLeft
?
'
1px
'
:
'
0px
'
;
container
.
style
.
borderRightWidth
=
borderColor
&&
isPositionLeft
?
'
1px
'
:
'
0px
'
;
}
protected
getActivityHoverOptions
():
IActivityHoverOptions
{
return
{
position
:
()
=>
HoverPosition
.
BELOW
...
...
src/vs/workbench/browser/parts/panel/panelPart.ts
浏览文件 @
f9943ec2
...
...
@@ -112,6 +112,7 @@ export abstract class BasePanelPart extends CompositePart<PaneComposite> impleme
private
readonly
viewContainerLocation
:
ViewContainerLocation
,
private
readonly
activePanelContextKey
:
IContextKey
<
string
>
,
private
panelFocusContextKey
:
IContextKey
<
boolean
>
,
borderWidth
:
(()
=>
number
)
|
undefined
,
@
INotificationService
notificationService
:
INotificationService
,
@
IStorageService
storageService
:
IStorageService
,
@
ITelemetryService
telemetryService
:
ITelemetryService
,
...
...
@@ -140,7 +141,7 @@ export abstract class BasePanelPart extends CompositePart<PaneComposite> impleme
'
panel
'
,
undefined
,
partId
,
{
hasTitle
:
true
}
{
hasTitle
:
true
,
borderWidth
}
);
this
.
panelRegistry
=
Registry
.
as
<
PaneCompositeRegistry
>
(
panelRegistryId
);
...
...
@@ -476,13 +477,13 @@ export abstract class BasePanelPart extends CompositePart<PaneComposite> impleme
const
container
=
assertIsDefined
(
this
.
getContainer
());
container
.
style
.
backgroundColor
=
this
.
getColor
(
this
.
backgroundColor
)
||
''
;
const
borderColor
=
this
.
getColor
(
PANEL_BORDER
)
||
this
.
getColor
(
contrastBorder
)
||
''
;
const
borderColor
=
this
.
getColor
(
contrastBorder
)
||
''
;
container
.
style
.
borderLeftColor
=
borderColor
;
container
.
style
.
borderRightColor
=
borderColor
;
const
title
=
this
.
getTitleArea
();
if
(
title
)
{
title
.
style
.
borderTopColor
=
this
.
getColor
(
PANEL_BORDER
)
||
this
.
getColor
(
contrastBorder
)
||
''
;
title
.
style
.
borderTopColor
=
this
.
getColor
(
contrastBorder
)
||
''
;
}
}
...
...
@@ -840,6 +841,7 @@ export class PanelPart extends BasePanelPart {
ViewContainerLocation
.
Panel
,
ActivePanelContext
.
bindTo
(
contextKeyService
),
PanelFocusContext
.
bindTo
(
contextKeyService
),
undefined
,
notificationService
,
storageService
,
telemetryService
,
...
...
@@ -858,6 +860,20 @@ export class PanelPart extends BasePanelPart {
this
.
_register
(
this
.
globalActions
.
onDidChange
(()
=>
this
.
updateGlobalToolbarActions
()));
}
override
updateStyles
():
void
{
super
.
updateStyles
();
const
container
=
assertIsDefined
(
this
.
getContainer
());
const
borderColor
=
this
.
getColor
(
PANEL_BORDER
)
||
this
.
getColor
(
contrastBorder
)
||
''
;
container
.
style
.
borderLeftColor
=
borderColor
;
container
.
style
.
borderRightColor
=
borderColor
;
const
title
=
this
.
getTitleArea
();
if
(
title
)
{
title
.
style
.
borderTopColor
=
this
.
getColor
(
PANEL_BORDER
)
||
this
.
getColor
(
contrastBorder
)
||
''
;
}
}
protected
getActivityHoverOptions
():
IActivityHoverOptions
{
return
{
position
:
()
=>
this
.
layoutService
.
getPanelPosition
()
===
Position
.
BOTTOM
&&
!
this
.
layoutService
.
isPanelMaximized
()
?
HoverPosition
.
ABOVE
:
HoverPosition
.
BELOW
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录