Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
5eeed7cf
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,发现更多精彩内容 >>
提交
5eeed7cf
编写于
6月 12, 2020
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix #86344
上级
376c7a8d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
55 addition
and
16 deletion
+55
-16
src/vs/workbench/contrib/extensions/browser/extensionsList.ts
...vs/workbench/contrib/extensions/browser/extensionsList.ts
+4
-4
src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts
...orkbench/contrib/preferences/browser/keybindingsEditor.ts
+51
-4
src/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css
...h/contrib/preferences/browser/media/keybindingsEditor.css
+0
-8
未找到文件。
src/vs/workbench/contrib/extensions/browser/extensionsList.ts
浏览文件 @
5eeed7cf
...
@@ -225,18 +225,18 @@ registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) =
...
@@ -225,18 +225,18 @@ registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) =
const
listActiveSelectionBackgroundColor
=
theme
.
getColor
(
listActiveSelectionBackground
);
const
listActiveSelectionBackgroundColor
=
theme
.
getColor
(
listActiveSelectionBackground
);
if
(
listActiveSelectionForegroundColor
&&
listActiveSelectionBackgroundColor
)
{
if
(
listActiveSelectionForegroundColor
&&
listActiveSelectionBackgroundColor
)
{
const
authorForeground
=
listActiveSelectionForegroundColor
.
transparent
(.
9
).
makeOpaque
(
listActiveSelectionBackgroundColor
);
const
authorForeground
=
listActiveSelectionForegroundColor
.
transparent
(.
9
).
makeOpaque
(
listActiveSelectionBackgroundColor
);
collector
.
addRule
(
`.extensions-list .monaco-list:focus .monaco-list-row:not(.disabled).selected
.focused
.author { color:
${
authorForeground
}
; }`
);
collector
.
addRule
(
`.extensions-list .monaco-list:focus .monaco-list-row:not(.disabled).selected .author { color:
${
authorForeground
}
; }`
);
const
disabledExtensionForeground
=
listActiveSelectionForegroundColor
.
transparent
(.
5
).
makeOpaque
(
listActiveSelectionBackgroundColor
);
const
disabledExtensionForeground
=
listActiveSelectionForegroundColor
.
transparent
(.
5
).
makeOpaque
(
listActiveSelectionBackgroundColor
);
collector
.
addRule
(
`.extensions-list .monaco-list:focus .monaco-list-row.disabled.selected
.focused
{ color:
${
disabledExtensionForeground
}
; }`
);
collector
.
addRule
(
`.extensions-list .monaco-list:focus .monaco-list-row.disabled.selected { color:
${
disabledExtensionForeground
}
; }`
);
}
}
const
listInactiveSelectionForegroundColor
=
theme
.
getColor
(
listInactiveSelectionForeground
);
const
listInactiveSelectionForegroundColor
=
theme
.
getColor
(
listInactiveSelectionForeground
);
const
listInactiveSelectionBackgroundColor
=
theme
.
getColor
(
listInactiveSelectionBackground
);
const
listInactiveSelectionBackgroundColor
=
theme
.
getColor
(
listInactiveSelectionBackground
);
if
(
listInactiveSelectionForegroundColor
&&
listInactiveSelectionBackgroundColor
)
{
if
(
listInactiveSelectionForegroundColor
&&
listInactiveSelectionBackgroundColor
)
{
const
authorForeground
=
listInactiveSelectionForegroundColor
.
transparent
(.
9
).
makeOpaque
(
listInactiveSelectionBackgroundColor
);
const
authorForeground
=
listInactiveSelectionForegroundColor
.
transparent
(.
9
).
makeOpaque
(
listInactiveSelectionBackgroundColor
);
collector
.
addRule
(
`.extensions-list .monaco-list .monaco-list-row:not(.disabled).selected
.focused
.author { color:
${
authorForeground
}
; }`
);
collector
.
addRule
(
`.extensions-list .monaco-list .monaco-list-row:not(.disabled).selected .author { color:
${
authorForeground
}
; }`
);
const
disabledExtensionForeground
=
listInactiveSelectionForegroundColor
.
transparent
(.
5
).
makeOpaque
(
listInactiveSelectionBackgroundColor
);
const
disabledExtensionForeground
=
listInactiveSelectionForegroundColor
.
transparent
(.
5
).
makeOpaque
(
listInactiveSelectionBackgroundColor
);
collector
.
addRule
(
`.extensions-list .monaco-list .monaco-list-row.disabled.selected
.focused
{ color:
${
disabledExtensionForeground
}
; }`
);
collector
.
addRule
(
`.extensions-list .monaco-list .monaco-list-row.disabled.selected { color:
${
disabledExtensionForeground
}
; }`
);
}
}
const
listFocusForegroundColor
=
theme
.
getColor
(
listFocusForeground
);
const
listFocusForegroundColor
=
theme
.
getColor
(
listFocusForeground
);
...
...
src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts
浏览文件 @
5eeed7cf
...
@@ -30,7 +30,7 @@ import { IThemeService, registerThemingParticipant, IColorTheme, ICssStyleCollec
...
@@ -30,7 +30,7 @@ import { IThemeService, registerThemingParticipant, IColorTheme, ICssStyleCollec
import
{
IContextKeyService
,
IContextKey
,
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IContextKeyService
,
IContextKey
,
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
StandardKeyboardEvent
,
IKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
StandardKeyboardEvent
,
IKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
KeyCode
,
ResolvedKeybinding
}
from
'
vs/base/common/keyCodes
'
;
import
{
KeyCode
,
ResolvedKeybinding
}
from
'
vs/base/common/keyCodes
'
;
import
{
listHighlightForeground
,
badgeBackground
,
contrastBorder
,
badgeForeground
,
listActiveSelectionForeground
,
listInactiveSelectionForeground
,
listHoverForeground
,
listFocusForeground
,
editorBackground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
listHighlightForeground
,
badgeBackground
,
contrastBorder
,
badgeForeground
,
listActiveSelectionForeground
,
listInactiveSelectionForeground
,
listHoverForeground
,
listFocusForeground
,
editorBackground
,
foreground
,
listActiveSelectionBackground
,
listInactiveSelectionBackground
,
listFocusBackground
,
listHoverBackground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
EditorExtensionsRegistry
}
from
'
vs/editor/browser/editorExtensions
'
;
import
{
EditorExtensionsRegistry
}
from
'
vs/editor/browser/editorExtensions
'
;
import
{
WorkbenchList
}
from
'
vs/platform/list/browser/listService
'
;
import
{
WorkbenchList
}
from
'
vs/platform/list/browser/listService
'
;
...
@@ -44,6 +44,8 @@ import { Emitter, Event } from 'vs/base/common/event';
...
@@ -44,6 +44,8 @@ import { Emitter, Event } from 'vs/base/common/event';
import
{
MenuRegistry
,
MenuId
,
isIMenuItem
}
from
'
vs/platform/actions/common/actions
'
;
import
{
MenuRegistry
,
MenuId
,
isIMenuItem
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IListAccessibilityProvider
}
from
'
vs/base/browser/ui/list/listWidget
'
;
import
{
IListAccessibilityProvider
}
from
'
vs/base/browser/ui/list/listWidget
'
;
import
{
preferencesEditIcon
}
from
'
vs/workbench/contrib/preferences/browser/preferencesWidgets
'
;
import
{
preferencesEditIcon
}
from
'
vs/workbench/contrib/preferences/browser/preferencesWidgets
'
;
import
{
Color
,
RGBA
}
from
'
vs/base/common/color
'
;
import
{
WORKBENCH_BACKGROUND
}
from
'
vs/workbench/common/theme
'
;
const
$
=
DOM
.
$
;
const
$
=
DOM
.
$
;
...
@@ -53,6 +55,8 @@ interface ColumnItem {
...
@@ -53,6 +55,8 @@ interface ColumnItem {
width
:
number
;
width
:
number
;
}
}
const
oddRowBackgroundColor
=
new
Color
(
new
RGBA
(
130
,
130
,
130
,
0.04
));
export
class
KeybindingsEditor
extends
BaseEditor
implements
IKeybindingsEditorPane
{
export
class
KeybindingsEditor
extends
BaseEditor
implements
IKeybindingsEditorPane
{
static
readonly
ID
:
string
=
'
workbench.editor.keybindings
'
;
static
readonly
ID
:
string
=
'
workbench.editor.keybindings
'
;
...
@@ -1119,11 +1123,56 @@ class AccessibilityProvider implements IListAccessibilityProvider<IKeybindingIte
...
@@ -1119,11 +1123,56 @@ class AccessibilityProvider implements IListAccessibilityProvider<IKeybindingIte
}
}
registerThemingParticipant
((
theme
:
IColorTheme
,
collector
:
ICssStyleCollector
)
=>
{
registerThemingParticipant
((
theme
:
IColorTheme
,
collector
:
ICssStyleCollector
)
=>
{
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-header { background-color:
${
oddRowBackgroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row.odd:not(.focused):not(.selected):not(:hover) { background-color:
${
oddRowBackgroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:not(:focus) .monaco-list-row.focused.odd:not(.selected):not(:hover) { background-color:
${
oddRowBackgroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:not(.focused) .monaco-list-row.focused.odd:not(.selected):not(:hover) { background-color:
${
oddRowBackgroundColor
}
; }`
);
const
foregroundColor
=
theme
.
getColor
(
foreground
);
if
(
foregroundColor
)
{
const
whenForegroundColor
=
foregroundColor
.
transparent
(.
8
).
makeOpaque
(
WORKBENCH_BACKGROUND
(
theme
));
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column > .code { color:
${
whenForegroundColor
}
; }`
);
const
whenForegroundColorForOddRow
=
foregroundColor
.
transparent
(.
8
).
makeOpaque
(
oddRowBackgroundColor
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row.odd > .column > .code { color:
${
whenForegroundColorForOddRow
}
; }`
);
}
const
listActiveSelectionForegroundColor
=
theme
.
getColor
(
listActiveSelectionForeground
);
const
listActiveSelectionBackgroundColor
=
theme
.
getColor
(
listActiveSelectionBackground
);
if
(
listActiveSelectionForegroundColor
&&
listActiveSelectionBackgroundColor
)
{
const
whenForegroundColor
=
listActiveSelectionForegroundColor
.
transparent
(.
8
).
makeOpaque
(
listActiveSelectionBackgroundColor
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column > .code { color:
${
whenForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.odd.selected > .column > .code { color:
${
whenForegroundColor
}
; }`
);
}
const
listInactiveSelectionForegroundColor
=
theme
.
getColor
(
listInactiveSelectionForeground
);
const
listInactiveSelectionBackgroundColor
=
theme
.
getColor
(
listInactiveSelectionBackground
);
if
(
listInactiveSelectionForegroundColor
&&
listInactiveSelectionBackgroundColor
)
{
const
whenForegroundColor
=
listInactiveSelectionForegroundColor
.
transparent
(.
8
).
makeOpaque
(
listInactiveSelectionBackgroundColor
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list .monaco-list-row.selected > .column > .code { color:
${
whenForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list .monaco-list-row.odd.selected > .column > .code { color:
${
whenForegroundColor
}
; }`
);
}
const
listFocusForegroundColor
=
theme
.
getColor
(
listFocusForeground
);
const
listFocusBackgroundColor
=
theme
.
getColor
(
listFocusBackground
);
if
(
listFocusForegroundColor
&&
listFocusBackgroundColor
)
{
const
whenForegroundColor
=
listFocusForegroundColor
.
transparent
(.
8
).
makeOpaque
(
listFocusBackgroundColor
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.focused > .column > .code { color:
${
whenForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.odd.focused > .column > .code { color:
${
whenForegroundColor
}
; }`
);
}
const
listHoverForegroundColor
=
theme
.
getColor
(
listHoverForeground
);
const
listHoverBackgroundColor
=
theme
.
getColor
(
listHoverBackground
);
if
(
listHoverForegroundColor
&&
listHoverBackgroundColor
)
{
const
whenForegroundColor
=
listHoverForegroundColor
.
transparent
(.
8
).
makeOpaque
(
listHoverBackgroundColor
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row:hover:not(.focused):not(.selected) > .column > .code { color:
${
whenForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.odd:hover:not(.focused):not(.selected) > .column > .code { color:
${
whenForegroundColor
}
; }`
);
}
const
listHighlightForegroundColor
=
theme
.
getColor
(
listHighlightForeground
);
const
listHighlightForegroundColor
=
theme
.
getColor
(
listHighlightForeground
);
if
(
listHighlightForegroundColor
)
{
if
(
listHighlightForegroundColor
)
{
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .highlight { color:
${
listHighlightForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .highlight { color:
${
listHighlightForegroundColor
}
; }`
);
}
}
const
listActiveSelectionForegroundColor
=
theme
.
getColor
(
listActiveSelectionForeground
);
if
(
listActiveSelectionForegroundColor
)
{
if
(
listActiveSelectionForegroundColor
)
{
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected.focused > .column .monaco-keybinding-key { color:
${
listActiveSelectionForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected.focused > .column .monaco-keybinding-key { color:
${
listActiveSelectionForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .monaco-keybinding-key { color:
${
listActiveSelectionForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .monaco-keybinding-key { color:
${
listActiveSelectionForegroundColor
}
; }`
);
...
@@ -1132,11 +1181,9 @@ registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) =
...
@@ -1132,11 +1181,9 @@ registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) =
if
(
listInactiveFocusAndSelectionForegroundColor
)
{
if
(
listInactiveFocusAndSelectionForegroundColor
)
{
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list .monaco-list-row.selected > .column .monaco-keybinding-key { color:
${
listInactiveFocusAndSelectionForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list .monaco-list-row.selected > .column .monaco-keybinding-key { color:
${
listInactiveFocusAndSelectionForegroundColor
}
; }`
);
}
}
const
listHoverForegroundColor
=
theme
.
getColor
(
listHoverForeground
);
if
(
listHoverForegroundColor
)
{
if
(
listHoverForegroundColor
)
{
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list .monaco-list-row:hover:not(.selected):not(.focused) > .column .monaco-keybinding-key { color:
${
listHoverForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list .monaco-list-row:hover:not(.selected):not(.focused) > .column .monaco-keybinding-key { color:
${
listHoverForegroundColor
}
; }`
);
}
}
const
listFocusForegroundColor
=
theme
.
getColor
(
listFocusForeground
);
if
(
listFocusForegroundColor
)
{
if
(
listFocusForegroundColor
)
{
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list .monaco-list-row.focused > .column .monaco-keybinding-key { color:
${
listFocusForegroundColor
}
; }`
);
collector
.
addRule
(
`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list .monaco-list-row.focused > .column .monaco-keybinding-key { color:
${
listFocusForegroundColor
}
; }`
);
}
}
...
...
src/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css
浏览文件 @
5eeed7cf
...
@@ -84,13 +84,6 @@
...
@@ -84,13 +84,6 @@
display
:
flex
;
display
:
flex
;
}
}
.keybindings-editor
>
.keybindings-body
>
.keybindings-list-header
,
.keybindings-editor
>
.keybindings-body
>
.keybindings-list-container
.monaco-list-row.odd
:not
(
.focused
)
:not
(
.selected
)
:not
(
:hover
),
.keybindings-editor
>
.keybindings-body
>
.keybindings-list-container
.monaco-list
:not
(
:focus
)
.monaco-list-row.focused.odd
:not
(
.selected
)
:not
(
:hover
),
.keybindings-editor
>
.keybindings-body
>
.keybindings-list-container
.monaco-list
:not
(
.focused
)
.monaco-list-row.focused.odd
:not
(
.selected
)
:not
(
:hover
)
{
background-color
:
rgba
(
130
,
130
,
130
,
0.04
);
}
.keybindings-editor
>
.keybindings-body
>
.keybindings-list-header
>
.header
{
.keybindings-editor
>
.keybindings-body
>
.keybindings-list-header
>
.header
{
text-align
:
left
;
text-align
:
left
;
font-weight
:
bold
;
font-weight
:
bold
;
...
@@ -147,7 +140,6 @@
...
@@ -147,7 +140,6 @@
.keybindings-editor
>
.keybindings-body
>
.keybindings-list-container
.monaco-list-row
>
.column
>
.code
{
.keybindings-editor
>
.keybindings-body
>
.keybindings-list-container
.monaco-list-row
>
.column
>
.code
{
font-family
:
var
(
--monaco-monospace-font
);
font-family
:
var
(
--monaco-monospace-font
);
font-size
:
90%
;
font-size
:
90%
;
opacity
:
0.8
;
display
:
flex
;
display
:
flex
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录