Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
68e0c759
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,发现更多精彩内容 >>
提交
68e0c759
编写于
4月 24, 2017
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
theming - always allow high contrast outline and border color even when not in hc theme
上级
dbe9e9c2
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
52 addition
and
57 deletion
+52
-57
src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
...workbench/browser/parts/activitybar/activitybarActions.ts
+3
-4
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
...vs/workbench/browser/parts/activitybar/activitybarPart.ts
+8
-8
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
+14
-13
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
+5
-4
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
+7
-7
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
+4
-4
src/vs/workbench/common/theme.ts
src/vs/workbench/common/theme.ts
+0
-8
src/vs/workbench/electron-browser/window.ts
src/vs/workbench/electron-browser/window.ts
+5
-5
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
+5
-3
src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts
...ch/parts/extensions/electron-browser/extensionsViewlet.ts
+1
-1
未找到文件。
src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
浏览文件 @
68e0c759
...
...
@@ -149,7 +149,6 @@ export class ActivityActionItem extends BaseActionItem {
private
updateStyles
():
void
{
const
theme
=
this
.
themeService
.
getTheme
();
const
isHighContrastTheme
=
theme
.
type
===
'
hc
'
;
// Label
if
(
this
.
$e
)
{
...
...
@@ -167,9 +166,9 @@ export class ActivityActionItem extends BaseActionItem {
this
.
$badgeContent
.
style
(
'
color
'
,
badgeForeground
?
badgeForeground
.
toString
()
:
null
);
this
.
$badgeContent
.
style
(
'
background-color
'
,
badgeBackground
?
badgeBackground
.
toString
()
:
null
);
this
.
$badgeContent
.
style
(
'
border-style
'
,
isHighContrastTheme
?
'
solid
'
:
null
);
this
.
$badgeContent
.
style
(
'
border-width
'
,
isHighContrastTheme
?
'
1px
'
:
null
);
this
.
$badgeContent
.
style
(
'
border-color
'
,
isHighContrastTheme
&&
hcBorder
?
hcBorder
.
toString
()
:
null
);
this
.
$badgeContent
.
style
(
'
border-style
'
,
hcBorder
?
'
solid
'
:
null
);
this
.
$badgeContent
.
style
(
'
border-width
'
,
hcBorder
?
'
1px
'
:
null
);
this
.
$badgeContent
.
style
(
'
border-color
'
,
hcBorder
?
hcBorder
.
toString
()
:
null
);
}
}
...
...
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
浏览文件 @
68e0c759
...
...
@@ -222,15 +222,15 @@ export class ActivitybarPart extends Part implements IActivityBarService {
const
background
=
this
.
getColor
(
ACTIVITY_BAR_BACKGROUND
);
container
.
style
(
'
background-color
'
,
background
);
const
useBorder
=
this
.
isHighContrastTheme
;
const
hcBorder
=
this
.
getColor
(
highContrastBorder
)
;
const
isPositionLeft
=
this
.
partService
.
getSideBarPosition
()
===
SideBarPosition
.
LEFT
;
container
.
style
(
'
box-sizing
'
,
use
Border
&&
isPositionLeft
?
'
border-box
'
:
null
);
container
.
style
(
'
border-right-width
'
,
use
Border
&&
isPositionLeft
?
'
1px
'
:
null
);
container
.
style
(
'
border-right-style
'
,
use
Border
&&
isPositionLeft
?
'
solid
'
:
null
);
container
.
style
(
'
border-right-color
'
,
useBorder
&&
isPositionLeft
?
this
.
getColor
(
highContrastBorder
)
:
null
);
container
.
style
(
'
border-left-width
'
,
use
Border
&&
!
isPositionLeft
?
'
1px
'
:
null
);
container
.
style
(
'
border-left-style
'
,
use
Border
&&
!
isPositionLeft
?
'
solid
'
:
null
);
container
.
style
(
'
border-left-color
'
,
useBorder
&&
!
isPositionLeft
?
this
.
getColor
(
highContrastBorder
)
:
null
);
container
.
style
(
'
box-sizing
'
,
hc
Border
&&
isPositionLeft
?
'
border-box
'
:
null
);
container
.
style
(
'
border-right-width
'
,
hc
Border
&&
isPositionLeft
?
'
1px
'
:
null
);
container
.
style
(
'
border-right-style
'
,
hc
Border
&&
isPositionLeft
?
'
solid
'
:
null
);
container
.
style
(
'
border-right-color
'
,
isPositionLeft
?
hcBorder
:
null
);
container
.
style
(
'
border-left-width
'
,
hc
Border
&&
!
isPositionLeft
?
'
1px
'
:
null
);
container
.
style
(
'
border-left-style
'
,
hc
Border
&&
!
isPositionLeft
?
'
solid
'
:
null
);
container
.
style
(
'
border-left-color
'
,
!
isPositionLeft
?
hcBorder
:
null
);
}
private
showContextMenu
(
e
:
MouseEvent
):
void
{
...
...
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
浏览文件 @
68e0c759
...
...
@@ -1016,11 +1016,12 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
// Title control
POSITIONS
.
forEach
(
position
=>
{
const
container
=
this
.
getTitleAreaControl
(
position
).
getContainer
();
const
hcBorder
=
this
.
getColor
(
highContrastBorder
);
container
.
style
.
backgroundColor
=
this
.
getColor
(
this
.
tabOptions
.
showTabs
?
TABS_CONTAINER_BACKGROUND
:
EDITOR_HEADER_BACKGROUND
);
container
.
style
.
borderBottomWidth
=
(
this
.
isHighContrastTheme
&&
this
.
tabOptions
.
showTabs
)
?
'
1px
'
:
null
;
container
.
style
.
borderBottomStyle
=
(
this
.
isHighContrastTheme
&&
this
.
tabOptions
.
showTabs
)
?
'
solid
'
:
null
;
container
.
style
.
borderBottomColor
=
(
this
.
isHighContrastTheme
&&
this
.
tabOptions
.
showTabs
)
?
this
.
getColor
(
highContrastBorder
)
:
null
;
container
.
style
.
borderBottomWidth
=
(
hcBorder
&&
this
.
tabOptions
.
showTabs
)
?
'
1px
'
:
null
;
container
.
style
.
borderBottomStyle
=
(
hcBorder
&&
this
.
tabOptions
.
showTabs
)
?
'
solid
'
:
null
;
container
.
style
.
borderBottomColor
=
this
.
tabOptions
.
showTabs
?
hcBorder
:
null
;
});
}
...
...
@@ -1225,15 +1226,15 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
const
containers
=
$this
.
visibleEditors
.
filter
(
e
=>
!!
e
).
map
(
e
=>
e
.
getContainer
());
containers
.
forEach
((
container
,
index
)
=>
{
if
(
container
&&
DOM
.
isAncestor
(
target
,
container
.
getHTMLElement
()))
{
const
useOutline
=
$this
.
isHighContrastTheme
;
const
hcOutline
=
$this
.
getColor
(
highContrastOutline
)
;
overlay
=
$
(
'
div
'
).
style
({
top
:
$this
.
tabOptions
.
showTabs
?
`
${
EditorGroupsControl
.
EDITOR_TITLE_HEIGHT
}
px`
:
0
,
height
:
$this
.
tabOptions
.
showTabs
?
`calc(100% -
${
EditorGroupsControl
.
EDITOR_TITLE_HEIGHT
}
px`
:
'
100%
'
,
backgroundColor
:
$this
.
getColor
(
EDITOR_DRAG_AND_DROP_BACKGROUND
),
outlineColor
:
useOutline
?
$this
.
getColor
(
highContrastOutline
)
:
null
,
outlineOffset
:
use
Outline
?
'
-2px
'
:
null
,
outlineStyle
:
use
Outline
?
'
dashed
'
:
null
,
outlineWidth
:
use
Outline
?
'
2px
'
:
null
outlineColor
:
hcOutline
,
outlineOffset
:
hc
Outline
?
'
-2px
'
:
null
,
outlineStyle
:
hc
Outline
?
'
dashed
'
:
null
,
outlineWidth
:
hc
Outline
?
'
2px
'
:
null
}).
id
(
overlayId
);
overlay
.
appendTo
(
container
);
...
...
@@ -1568,11 +1569,11 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
const
background
=
this
.
getColor
(
isDropping
?
EDITOR_DRAG_AND_DROP_BACKGROUND
:
groupCount
>
0
?
EDITOR_GROUP_BACKGROUND
:
null
);
element
.
style
.
backgroundColor
=
background
;
const
useOutline
=
this
.
isHighContrastTheme
&&
isDropping
;
element
.
style
.
outlineColor
=
useOutline
?
this
.
getColor
(
highContrastOutline
)
:
null
;
element
.
style
.
outlineStyle
=
use
Outline
?
'
dashed
'
:
null
;
element
.
style
.
outlineWidth
=
use
Outline
?
'
2px
'
:
null
;
element
.
style
.
outlineOffset
=
use
Outline
?
'
-2px
'
:
null
;
const
hcOutline
=
this
.
getColor
(
highContrastOutline
)
;
element
.
style
.
outlineColor
=
isDropping
?
hcOutline
:
null
;
element
.
style
.
outlineStyle
=
isDropping
&&
hc
Outline
?
'
dashed
'
:
null
;
element
.
style
.
outlineWidth
=
isDropping
&&
hc
Outline
?
'
2px
'
:
null
;
element
.
style
.
outlineOffset
=
isDropping
&&
hc
Outline
?
'
-2px
'
:
null
;
}
private
posSilo
(
pos
:
number
,
leftTop
:
string
|
number
,
rightBottom
?:
string
|
number
,
borderLeftTopWidth
?:
string
|
number
):
void
{
...
...
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
浏览文件 @
68e0c759
...
...
@@ -219,15 +219,16 @@ export class TabsTitleControl extends TitleControl {
element
.
style
.
backgroundColor
=
isDND
?
this
.
getColor
(
EDITOR_DRAG_AND_DROP_BACKGROUND
)
:
noDNDBackgroundColor
;
// Outline
if
(
this
.
isHighContrastTheme
&&
isDND
)
{
const
hcOutline
=
this
.
getColor
(
highContrastOutline
);
if
(
hcOutline
&&
isDND
)
{
element
.
style
.
outlineWidth
=
'
2px
'
;
element
.
style
.
outlineStyle
=
'
dashed
'
;
element
.
style
.
outlineColor
=
this
.
getColor
(
highContrastOutline
)
;
element
.
style
.
outlineColor
=
hcOutline
;
element
.
style
.
outlineOffset
=
isTab
?
'
-5px
'
:
'
-3px
'
;
}
else
{
element
.
style
.
outlineWidth
=
null
;
element
.
style
.
outlineStyle
=
null
;
element
.
style
.
outlineColor
=
this
.
isHighContrastTheme
?
this
.
getColor
(
highContrastOutline
)
:
null
;
element
.
style
.
outlineColor
=
hcOutline
;
element
.
style
.
outlineOffset
=
null
;
}
}
...
...
@@ -273,7 +274,7 @@ export class TabsTitleControl extends TitleControl {
tabContainer
.
title
=
title
;
tabContainer
.
style
.
borderLeftColor
=
(
index
!==
0
)
?
this
.
getColor
(
TAB_BORDER
)
:
null
;
tabContainer
.
style
.
borderRightColor
=
(
index
===
editorsOfGroup
.
length
-
1
)
?
this
.
getColor
(
TAB_BORDER
)
:
null
;
tabContainer
.
style
.
outlineColor
=
this
.
isHighContrastTheme
?
this
.
getColor
(
highContrastOutline
)
:
null
;
tabContainer
.
style
.
outlineColor
=
this
.
getColor
(
highContrastOutline
)
;
const
tabOptions
=
this
.
editorGroupService
.
getTabOptions
();
[
'
off
'
,
'
left
'
].
forEach
(
option
=>
{
...
...
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
浏览文件 @
68e0c759
...
...
@@ -83,14 +83,14 @@ export class SidebarPart extends CompositePart<Viewlet> {
container
.
style
(
'
background-color
'
,
this
.
getColor
(
SIDE_BAR_BACKGROUND
));
const
useBorder
=
this
.
isHighContrastTheme
;
const
hcBorder
=
this
.
getColor
(
highContrastBorder
)
;
const
isPositionLeft
=
this
.
partService
.
getSideBarPosition
()
===
SideBarPosition
.
LEFT
;
container
.
style
(
'
border-right-width
'
,
use
Border
&&
isPositionLeft
?
'
1px
'
:
null
);
container
.
style
(
'
border-right-style
'
,
use
Border
&&
isPositionLeft
?
'
solid
'
:
null
);
container
.
style
(
'
border-right-color
'
,
useBorder
&&
isPositionLeft
?
this
.
getColor
(
highContrastBorder
)
:
null
);
container
.
style
(
'
border-left-width
'
,
use
Border
&&
!
isPositionLeft
?
'
1px
'
:
null
);
container
.
style
(
'
border-left-style
'
,
use
Border
&&
!
isPositionLeft
?
'
solid
'
:
null
);
container
.
style
(
'
border-left-color
'
,
useBorder
&&
!
isPositionLeft
?
this
.
getColor
(
highContrastBorder
)
:
null
);
container
.
style
(
'
border-right-width
'
,
hc
Border
&&
isPositionLeft
?
'
1px
'
:
null
);
container
.
style
(
'
border-right-style
'
,
hc
Border
&&
isPositionLeft
?
'
solid
'
:
null
);
container
.
style
(
'
border-right-color
'
,
isPositionLeft
?
hcBorder
:
null
);
container
.
style
(
'
border-left-width
'
,
hc
Border
&&
!
isPositionLeft
?
'
1px
'
:
null
);
container
.
style
(
'
border-left-style
'
,
hc
Border
&&
!
isPositionLeft
?
'
solid
'
:
null
);
container
.
style
(
'
border-left-color
'
,
!
isPositionLeft
?
hcBorder
:
null
);
}
public
openViewlet
(
id
:
string
,
focus
?:
boolean
):
TPromise
<
Viewlet
>
{
...
...
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
浏览文件 @
68e0c759
...
...
@@ -139,10 +139,10 @@ export class StatusbarPart extends Part implements IStatusbarService {
container
.
style
(
'
color
'
,
this
.
getColor
(
STATUS_BAR_FOREGROUND
));
container
.
style
(
'
background-color
'
,
this
.
getColor
(
this
.
contextService
.
hasWorkspace
()
?
STATUS_BAR_BACKGROUND
:
STATUS_BAR_NO_FOLDER_BACKGROUND
));
const
useBorder
=
this
.
isHighContrastTheme
;
container
.
style
(
'
border-top-width
'
,
use
Border
?
'
1px
'
:
null
);
container
.
style
(
'
border-top-style
'
,
use
Border
?
'
solid
'
:
null
);
container
.
style
(
'
border-top-color
'
,
useBorder
?
this
.
getColor
(
highContrastBorder
)
:
null
);
const
hcBorder
=
this
.
getColor
(
highContrastBorder
)
;
container
.
style
(
'
border-top-width
'
,
hc
Border
?
'
1px
'
:
null
);
container
.
style
(
'
border-top-style
'
,
hc
Border
?
'
solid
'
:
null
);
container
.
style
(
'
border-top-color
'
,
hcBorder
);
}
private
doCreateStatusItem
(
alignment
:
StatusbarAlignment
,
priority
:
number
=
0
):
HTMLElement
{
...
...
src/vs/workbench/common/theme.ts
浏览文件 @
68e0c759
...
...
@@ -301,14 +301,6 @@ export class Themable extends Disposable {
this
.
_toUnbind
.
push
(
this
.
themeService
.
onThemeChange
(
theme
=>
this
.
onThemeChange
(
theme
)));
}
protected
get
isHighContrastTheme
():
boolean
{
return
this
.
theme
.
type
===
'
hc
'
;
}
protected
get
isLightTheme
():
boolean
{
return
this
.
theme
.
type
===
'
light
'
;
}
protected
get
toUnbind
()
{
return
this
.
_toUnbind
;
}
...
...
src/vs/workbench/electron-browser/window.ts
浏览文件 @
68e0c759
...
...
@@ -134,17 +134,17 @@ export class ElectronWindow extends Themable {
// Find out if folders are dragged and show the appropiate feedback then
this
.
includesFolder
(
draggedExternalResources
).
done
(
includesFolder
=>
{
if
(
includesFolder
)
{
const
useOutline
=
this
.
isHighContrastTheme
;
const
hcOutline
=
this
.
getColor
(
highContrastOutline
)
;
dropOverlay
=
$
(
window
.
document
.
getElementById
(
this
.
partService
.
getWorkbenchElementId
()))
.
div
({
id
:
'
monaco-workbench-drop-overlay
'
})
.
style
({
backgroundColor
:
this
.
getColor
(
EDITOR_DRAG_AND_DROP_BACKGROUND
),
outlineColor
:
useOutline
?
this
.
getColor
(
highContrastOutline
)
:
null
,
outlineOffset
:
use
Outline
?
'
-2px
'
:
null
,
outlineStyle
:
use
Outline
?
'
dashed
'
:
null
,
outlineWidth
:
use
Outline
?
'
2px
'
:
null
outlineColor
:
hcOutline
,
outlineOffset
:
hc
Outline
?
'
-2px
'
:
null
,
outlineStyle
:
hc
Outline
?
'
dashed
'
:
null
,
outlineWidth
:
hc
Outline
?
'
2px
'
:
null
})
.
on
(
DOM
.
EventType
.
DROP
,
(
e
:
DragEvent
)
=>
{
DOM
.
EventHelper
.
stop
(
e
,
true
);
...
...
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
浏览文件 @
68e0c759
...
...
@@ -145,9 +145,11 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
if
(
this
.
$el
)
{
this
.
$el
.
style
(
'
background-color
'
,
this
.
getColor
(
debugToolBarBackground
));
this
.
$el
.
style
(
'
border-style
'
,
this
.
isHighContrastTheme
?
'
solid
'
:
null
);
this
.
$el
.
style
(
'
border-width
'
,
this
.
isHighContrastTheme
?
'
1px
'
:
null
);
this
.
$el
.
style
(
'
border-color
'
,
this
.
isHighContrastTheme
?
this
.
getColor
(
highContrastBorder
)
:
null
);
const
hcBorder
=
this
.
getColor
(
highContrastBorder
);
this
.
$el
.
style
(
'
border-style
'
,
hcBorder
?
'
solid
'
:
null
);
this
.
$el
.
style
(
'
border-width
'
,
hcBorder
?
'
1px
'
:
null
);
this
.
$el
.
style
(
'
border-color
'
,
hcBorder
);
}
}
...
...
src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts
浏览文件 @
68e0c759
...
...
@@ -146,7 +146,7 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet {
public
updateStyles
():
void
{
super
.
updateStyles
();
const
hcBorder
=
this
.
isHighContrastTheme
?
this
.
getColor
(
highContrastBorder
)
:
null
;
const
hcBorder
=
this
.
getColor
(
highContrastBorder
)
;
this
.
searchBox
.
style
.
backgroundColor
=
this
.
getColor
(
inputBackground
);
this
.
searchBox
.
style
.
color
=
this
.
getColor
(
inputForeground
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录