Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
51ff4183
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,体验更适合开发者的 AI 搜索 >>
提交
51ff4183
编写于
1月 17, 2017
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean up ThemeService API
上级
ef6b3de1
变更
13
展开全部
隐藏空白更改
内联
并排
Showing
13 changed file
with
219 addition
and
181 deletion
+219
-181
src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts
...ntrib/inspectTMScopes/electron-browser/inspectTMScopes.ts
+7
-9
src/vs/editor/electron-browser/textMate/TMHelper.ts
src/vs/editor/electron-browser/textMate/TMHelper.ts
+3
-3
src/vs/editor/electron-browser/textMate/TMSyntax.ts
src/vs/editor/electron-browser/textMate/TMSyntax.ts
+2
-1
src/vs/workbench/browser/parts/editor/textEditor.ts
src/vs/workbench/browser/parts/editor/textEditor.ts
+1
-1
src/vs/workbench/parts/debug/electron-browser/repl.ts
src/vs/workbench/parts/debug/electron-browser/repl.ts
+1
-1
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
+1
-1
src/vs/workbench/parts/html/browser/webview.ts
src/vs/workbench/parts/html/browser/webview.ts
+3
-1
src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts
...orkbench/parts/terminal/electron-browser/terminalPanel.ts
+4
-7
src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts
...ench/parts/themes/electron-browser/themes.contribution.ts
+4
-6
src/vs/workbench/parts/themes/test/electron-browser/themes.test.contribution.ts
.../themes/test/electron-browser/themes.test.contribution.ts
+7
-7
src/vs/workbench/services/themes/common/themeService.ts
src/vs/workbench/services/themes/common/themeService.ts
+21
-17
src/vs/workbench/services/themes/electron-browser/stylesContributions.ts
...h/services/themes/electron-browser/stylesContributions.ts
+9
-9
src/vs/workbench/services/themes/electron-browser/themeService.ts
...orkbench/services/themes/electron-browser/themeService.ts
+156
-118
未找到文件。
src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts
浏览文件 @
51ff4183
...
...
@@ -241,15 +241,13 @@ class InspectTMScopesWidget extends Disposable implements IContentWidget {
result
+=
`<tr><td class="tm-metadata-key">background</td><td class="tm-metadata-value">
${
metadata
.
background
}
</td>`
;
result
+=
`</tbody></table>`
;
let
theme
=
this
.
_themeService
.
getColorThemeDocument
();
if
(
theme
)
{
result
+=
`<hr/>`
;
let
matchingRule
=
findMatchingThemeRule
(
theme
,
data
.
tokens1
[
token1Index
].
scopes
);
if
(
matchingRule
)
{
result
+=
`<code class="tm-theme-selector">
${
matchingRule
.
rawSelector
}
\n
${
JSON
.
stringify
(
matchingRule
.
settings
,
null
,
'
\t
'
)}
</code>`
;
}
else
{
result
+=
`<span class="tm-theme-selector">No theme selector.</span>`
;
}
let
theme
=
this
.
_themeService
.
getColorTheme
();
result
+=
`<hr/>`
;
let
matchingRule
=
findMatchingThemeRule
(
theme
,
data
.
tokens1
[
token1Index
].
scopes
);
if
(
matchingRule
)
{
result
+=
`<code class="tm-theme-selector">
${
matchingRule
.
rawSelector
}
\n
${
JSON
.
stringify
(
matchingRule
.
settings
,
null
,
'
\t
'
)}
</code>`
;
}
else
{
result
+=
`<span class="tm-theme-selector">No theme selector.</span>`
;
}
result
+=
`<hr/>`
;
...
...
src/vs/editor/electron-browser/textMate/TMHelper.ts
浏览文件 @
51ff4183
...
...
@@ -5,9 +5,9 @@
'
use strict
'
;
import
{
I
ThemeDocument
,
IThemeSettingStyle
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
I
ColorTheme
,
IThemeSettingStyle
}
from
'
vs/workbench/services/themes/common/themeService
'
;
export
function
findMatchingThemeRule
(
theme
:
I
ThemeDocument
,
scopes
:
string
[]):
ThemeRule
{
export
function
findMatchingThemeRule
(
theme
:
I
ColorTheme
,
scopes
:
string
[]):
ThemeRule
{
for
(
let
i
=
scopes
.
length
-
1
;
i
>=
0
;
i
--
)
{
let
parentScopes
=
scopes
.
slice
(
0
,
i
);
let
scope
=
scopes
[
i
];
...
...
@@ -19,7 +19,7 @@ export function findMatchingThemeRule(theme: IThemeDocument, scopes: string[]):
return
null
;
}
function
findMatchingThemeRule2
(
theme
:
I
ThemeDocument
,
scope
:
string
,
parentScopes
:
string
[]):
ThemeRule
{
function
findMatchingThemeRule2
(
theme
:
I
ColorTheme
,
scope
:
string
,
parentScopes
:
string
[]):
ThemeRule
{
let
result
:
ThemeRule
=
null
;
// Loop backwards, to ensure the last most specific rule wins
...
...
src/vs/editor/electron-browser/textMate/TMSyntax.ts
浏览文件 @
51ff4183
...
...
@@ -162,7 +162,8 @@ export class MainProcessTextMateSyntax implements ITextMateService {
}
private
_updateTheme
():
void
{
this
.
_grammarRegistry
.
setTheme
(
this
.
_themeService
.
getColorThemeDocument
());
let
colorTheme
=
this
.
_themeService
.
getColorTheme
();
this
.
_grammarRegistry
.
setTheme
({
name
:
colorTheme
.
label
,
settings
:
colorTheme
.
settings
});
let
colorMap
=
this
.
_grammarRegistry
.
getColorMap
();
let
cssRules
=
MainProcessTextMateSyntax
.
_generateCSS
(
colorMap
);
this
.
_styleElement
.
innerHTML
=
cssRules
;
...
...
src/vs/workbench/browser/parts/editor/textEditor.ts
浏览文件 @
51ff4183
...
...
@@ -112,7 +112,7 @@ export abstract class BaseTextEditor extends BaseEditor {
objects
.
assign
(
overrides
,
{
overviewRulerLanes
:
3
,
lineNumbersMinChars
:
3
,
theme
:
this
.
themeService
.
getColorTheme
(),
theme
:
this
.
themeService
.
getColorTheme
()
.
id
,
fixedOverflowWidgets
:
true
});
return
overrides
;
...
...
src/vs/workbench/parts/debug/electron-browser/repl.ts
浏览文件 @
51ff4183
...
...
@@ -271,7 +271,7 @@ export class Repl extends Panel implements IPrivateReplService {
},
lineDecorationsWidth
:
0
,
scrollBeyondLastLine
:
false
,
theme
:
this
.
themeService
.
getColorTheme
(),
theme
:
this
.
themeService
.
getColorTheme
()
.
id
,
renderLineHighlight
:
'
none
'
,
fixedOverflowWidgets
:
true
,
acceptSuggestionOnEnter
:
false
...
...
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
浏览文件 @
51ff4183
...
...
@@ -325,7 +325,7 @@ export class ExtensionEditor extends BaseEditor {
webview
.
contents
=
[
body
];
webview
.
onDidClickLink
(
link
=>
this
.
openerService
.
open
(
link
),
null
,
this
.
contentDisposables
);
this
.
themeService
.
onDidColorThemeChange
(
theme
Id
=>
webview
.
style
(
themeId
),
null
,
this
.
contentDisposables
);
this
.
themeService
.
onDidColorThemeChange
(
theme
=>
webview
.
style
(
theme
),
null
,
this
.
contentDisposables
);
this
.
contentDisposables
.
push
(
webview
);
})
.
then
(
null
,
()
=>
{
...
...
src/vs/workbench/parts/html/browser/webview.ts
浏览文件 @
51ff4183
...
...
@@ -14,6 +14,7 @@ import { addDisposableListener, addClass } from 'vs/base/browser/dom';
import
{
isLightTheme
,
isDarkTheme
}
from
'
vs/platform/theme/common/themes
'
;
import
{
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
MenuRegistry
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IColorTheme
}
from
'
vs/workbench/services/themes/common/themeService
'
;
declare
interface
WebviewElement
extends
HTMLElement
{
src
:
string
;
...
...
@@ -157,7 +158,8 @@ export default class Webview {
this
.
_send
(
'
focus
'
);
}
style
(
themeId
:
string
):
void
{
style
(
theme
:
IColorTheme
):
void
{
let
themeId
=
theme
.
id
;
const
{
color
,
backgroundColor
,
fontFamily
,
fontWeight
,
fontSize
}
=
window
.
getComputedStyle
(
this
.
_styleElement
);
let
value
=
`
...
...
src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts
浏览文件 @
51ff4183
...
...
@@ -15,7 +15,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
ITerminalService
,
ITerminalFont
,
TERMINAL_PANEL_ID
}
from
'
vs/workbench/parts/terminal/common/terminal
'
;
import
{
IThemeService
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
IThemeService
,
IColorTheme
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
KillTerminalAction
,
CreateNewTerminalAction
,
SwitchTerminalInstanceAction
,
SwitchTerminalInstanceActionItem
,
CopyTerminalSelectionAction
,
TerminalPasteAction
}
from
'
vs/workbench/parts/terminal/electron-browser/terminalActions
'
;
import
{
Panel
}
from
'
vs/workbench/browser/panel
'
;
import
{
StandardMouseEvent
}
from
'
vs/base/browser/mouseEvent
'
;
...
...
@@ -62,7 +62,7 @@ export class TerminalPanel extends Panel {
this
.
_terminalService
.
setContainers
(
this
.
getContainer
().
getHTMLElement
(),
this
.
_terminalContainer
);
this
.
_register
(
this
.
_themeService
.
onDidColorThemeChange
(
theme
Id
=>
this
.
_updateTheme
(
themeId
)));
this
.
_register
(
this
.
_themeService
.
onDidColorThemeChange
(
theme
=>
this
.
_updateTheme
(
theme
)));
this
.
_register
(
this
.
_configurationService
.
onDidUpdateConfiguration
(()
=>
this
.
_updateFont
()));
this
.
_updateFont
();
this
.
_updateTheme
();
...
...
@@ -192,11 +192,8 @@ export class TerminalPanel extends Panel {
}));
}
private
_updateTheme
(
themeId
?:
string
):
void
{
if
(
!
themeId
)
{
themeId
=
this
.
_themeService
.
getColorTheme
();
}
private
_updateTheme
(
colorTheme
?:
IColorTheme
):
void
{
let
themeId
=
colorTheme
.
id
;
let
baseThemeId
=
getBaseThemeId
(
themeId
);
if
(
baseThemeId
===
this
.
_currentBaseThemeId
)
{
return
;
...
...
src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts
浏览文件 @
51ff4183
...
...
@@ -40,8 +40,7 @@ export class SelectColorThemeAction extends Action {
run
():
TPromise
<
void
>
{
return
this
.
themeService
.
getColorThemes
().
then
(
themes
=>
{
const
currentThemeId
=
this
.
themeService
.
getColorTheme
();
const
currentTheme
=
themes
.
filter
(
theme
=>
theme
.
id
===
currentThemeId
)[
0
];
const
currentTheme
=
this
.
themeService
.
getColorTheme
();
const
pickInMarketPlace
=
findInMarketplacePick
(
this
.
viewletService
,
'
category:themes
'
);
...
...
@@ -58,7 +57,7 @@ export class SelectColorThemeAction extends Action {
};
const
placeHolder
=
localize
(
'
themes.selectTheme
'
,
"
Select Color Theme
"
);
const
autoFocusIndex
=
firstIndex
(
picks
,
p
=>
p
.
id
===
currentTheme
I
d
);
const
autoFocusIndex
=
firstIndex
(
picks
,
p
=>
p
.
id
===
currentTheme
.
i
d
);
const
delayer
=
new
Delayer
<
void
>
(
100
);
if
(
this
.
extensionGalleryService
.
isEnabled
())
{
...
...
@@ -94,8 +93,7 @@ class SelectIconThemeAction extends Action {
run
():
TPromise
<
void
>
{
return
this
.
themeService
.
getFileIconThemes
().
then
(
themes
=>
{
const
currentThemeId
=
this
.
themeService
.
getFileIconTheme
();
const
currentTheme
=
themes
.
filter
(
theme
=>
theme
.
id
===
currentThemeId
)[
0
];
const
currentTheme
=
this
.
themeService
.
getFileIconTheme
();
const
pickInMarketPlace
=
findInMarketplacePick
(
this
.
viewletService
,
'
tag:icon-theme
'
);
...
...
@@ -114,7 +112,7 @@ class SelectIconThemeAction extends Action {
};
const
placeHolder
=
localize
(
'
themes.selectIconTheme
'
,
"
Select File Icon Theme
"
);
const
autoFocusIndex
=
firstIndex
(
picks
,
p
=>
p
.
id
===
currentTheme
I
d
);
const
autoFocusIndex
=
firstIndex
(
picks
,
p
=>
p
.
id
===
currentTheme
.
i
d
);
const
delayer
=
new
Delayer
<
void
>
(
100
);
...
...
src/vs/workbench/parts/themes/test/electron-browser/themes.test.contribution.ts
浏览文件 @
51ff4183
...
...
@@ -12,7 +12,7 @@ import { IModeService } from 'vs/editor/common/services/modeService';
import
pfs
=
require
(
'
vs/base/node/pfs
'
);
import
{
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
IInstantiationService
,
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IThemeService
,
I
ThemeDocument
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
IThemeService
,
I
ColorTheme
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
toResource
}
from
'
vs/workbench/common/editor
'
;
import
{
ITextMateService
}
from
'
vs/editor/node/textMate/textMateService
'
;
...
...
@@ -40,11 +40,11 @@ interface IThemesResult {
}
class
ThemeDocument
{
private
readonly
_theme
:
I
ThemeDocument
;
private
readonly
_theme
:
I
ColorTheme
;
private
readonly
_cache
:
{
[
scopes
:
string
]:
ThemeRule
;
};
private
readonly
_defaultColor
:
string
;
constructor
(
theme
:
I
ThemeDocument
)
{
constructor
(
theme
:
I
ColorTheme
)
{
this
.
_theme
=
theme
;
this
.
_cache
=
Object
.
create
(
null
);
this
.
_defaultColor
=
'
#000000
'
;
...
...
@@ -68,7 +68,7 @@ class ThemeDocument {
let
expected
=
this
.
_defaultColor
.
toUpperCase
();
// No matching rule
if
(
actual
!==
expected
)
{
throw
new
Error
(
`[
${
this
.
_theme
.
name
}
]: Unexpected color
${
actual
}
for
${
scopes
}
. Expected default
${
expected
}
`
);
throw
new
Error
(
`[
${
this
.
_theme
.
label
}
]: Unexpected color
${
actual
}
for
${
scopes
}
. Expected default
${
expected
}
`
);
}
return
this
.
_generateExplanation
(
'
default
'
,
color
);
}
...
...
@@ -76,7 +76,7 @@ class ThemeDocument {
let
actual
=
color
.
toUpperCase
();
let
expected
=
matchingRule
.
settings
.
foreground
.
toUpperCase
();
if
(
actual
!==
expected
)
{
throw
new
Error
(
`[
${
this
.
_theme
.
name
}
]: Unexpected color
${
actual
}
for
${
scopes
}
. Expected
${
expected
}
coming in from
${
matchingRule
.
rawSelector
}
`
);
throw
new
Error
(
`[
${
this
.
_theme
.
label
}
]: Unexpected color
${
actual
}
for
${
scopes
}
. Expected
${
expected
}
coming in from
${
matchingRule
.
rawSelector
}
`
);
}
return
this
.
_generateExplanation
(
matchingRule
.
rawSelector
,
color
);
}
...
...
@@ -187,14 +187,14 @@ class Snapper {
if
(
success
)
{
let
themeName
=
getThemeName
(
themeId
);
result
[
themeName
]
=
{
document
:
new
ThemeDocument
(
this
.
themeService
.
getColorTheme
Document
()),
document
:
new
ThemeDocument
(
this
.
themeService
.
getColorTheme
()),
tokens
:
this
.
_themedTokenize
(
grammar
,
lines
)
};
}
});
}));
}).
then
(
_
=>
{
return
this
.
themeService
.
setColorTheme
(
currentTheme
,
false
).
then
(
_
=>
{
return
this
.
themeService
.
setColorTheme
(
currentTheme
.
id
,
false
).
then
(
_
=>
{
return
result
;
});
});
...
...
src/vs/workbench/services/themes/common/themeService.ts
浏览文件 @
51ff4183
...
...
@@ -14,30 +14,34 @@ export const VS_LIGHT_THEME = 'vs';
export
const
VS_DARK_THEME
=
'
vs-dark
'
;
export
const
VS_HC_THEME
=
'
hc-black
'
;
export
interface
IThemeService
{
_serviceBrand
:
any
;
setColorTheme
(
themeId
:
string
,
broadcastToAllWindows
:
boolean
):
TPromise
<
boolean
>
;
getColorTheme
():
string
;
getColorThemeDocument
():
IThemeDocument
;
getColorThemes
():
TPromise
<
IThemeData
[]
>
;
onDidColorThemeChange
:
Event
<
string
>
;
setFileIconTheme
(
iconThemeId
:
string
,
broadcastToAllWindows
:
boolean
):
TPromise
<
boolean
>
;
getFileIconTheme
():
string
;
getFileIconThemes
():
TPromise
<
IThemeData
[]
>
;
export
class
IColorTheme
{
id
:
string
;
label
:
string
;
description
?:
string
;
isLoaded
:
boolean
;
settings
?:
IThemeSetting
[];
}
export
interface
I
ThemeData
{
export
interface
I
FileIconTheme
{
id
:
string
;
label
:
string
;
description
?:
string
;
path
:
string
;
isLoaded
:
boolean
;
hasFileIcons
?:
boolean
;
hasFolderIcons
?:
boolean
;
}
export
interface
IThemeDocument
{
name
:
string
;
include
:
string
;
settings
:
IThemeSetting
[];
export
interface
IThemeService
{
_serviceBrand
:
any
;
setColorTheme
(
themeId
:
string
,
broadcastToAllWindows
:
boolean
):
TPromise
<
IColorTheme
>
;
getColorTheme
():
IColorTheme
;
getColorThemes
():
TPromise
<
IColorTheme
[]
>
;
onDidColorThemeChange
:
Event
<
IColorTheme
>
;
setFileIconTheme
(
iconThemeId
:
string
,
broadcastToAllWindows
:
boolean
):
TPromise
<
IFileIconTheme
>
;
getFileIconTheme
():
IFileIconTheme
;
getFileIconThemes
():
TPromise
<
IFileIconTheme
[]
>
;
onDidFileIconThemeChange
:
Event
<
IFileIconTheme
>
;
}
export
interface
IThemeSetting
{
...
...
src/vs/workbench/services/themes/electron-browser/stylesContributions.ts
浏览文件 @
51ff4183
...
...
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
ITheme
Document
,
ITheme
Setting
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
IThemeSetting
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
import
{
getBaseThemeId
,
getSyntaxThemeId
}
from
'
vs/platform/theme/common/themes
'
;
...
...
@@ -59,9 +59,9 @@ class Theme {
private
settings
:
IThemeSetting
[];
private
globalSettings
:
ThemeGlobalSettings
=
null
;
constructor
(
private
themeId
:
string
,
theme
Document
:
IThemeDocument
)
{
constructor
(
private
themeId
:
string
,
theme
Settings
:
IThemeSetting
[]
)
{
this
.
selector
=
`
${
getBaseThemeId
(
themeId
)}
.
${
getSyntaxThemeId
(
themeId
)}
`
;
this
.
settings
=
theme
Document
.
s
ettings
;
this
.
settings
=
theme
S
ettings
;
let
settings
=
this
.
settings
[
0
];
if
(
!
settings
.
scope
)
{
this
.
globalSettings
=
settings
.
settings
;
...
...
@@ -92,7 +92,7 @@ abstract class StyleRules {
export
class
EditorStylesContribution
{
public
contributeStyles
(
themeId
:
string
,
theme
Document
:
IThemeDocument
,
cssRules
:
string
[])
{
public
contributeStyles
(
themeId
:
string
,
theme
Settings
:
IThemeSetting
[]
,
cssRules
:
string
[])
{
let
editorStyleRules
=
[
new
EditorBackgroundStyleRules
(),
new
EditorCursorStyleRules
(),
...
...
@@ -106,7 +106,7 @@ export class EditorStylesContribution {
new
EditorHoverHighlightStyleRules
(),
new
EditorLinkStyleRules
()
];
let
theme
=
new
Theme
(
themeId
,
theme
Document
);
let
theme
=
new
Theme
(
themeId
,
theme
Settings
);
if
(
theme
.
hasGlobalSettings
())
{
editorStyleRules
.
forEach
((
editorStyleRule
=>
{
editorStyleRule
.
getCssRules
(
theme
,
cssRules
);
...
...
@@ -117,8 +117,8 @@ export class EditorStylesContribution {
export
class
SearchViewStylesContribution
{
public
contributeStyles
(
themeId
:
string
,
theme
Document
:
IThemeDocument
,
cssRules
:
string
[]):
void
{
let
theme
=
new
Theme
(
themeId
,
theme
Document
);
public
contributeStyles
(
themeId
:
string
,
theme
Settings
:
IThemeSetting
[]
,
cssRules
:
string
[]):
void
{
let
theme
=
new
Theme
(
themeId
,
theme
Settings
);
if
(
theme
.
hasGlobalSettings
())
{
if
(
theme
.
getGlobalSettings
().
findMatchHighlight
)
{
let
color
=
new
Color
(
theme
.
getGlobalSettings
().
findMatchHighlight
);
...
...
@@ -160,8 +160,8 @@ export class TerminalStylesContribution {
return
`rgba(
${
r
}
,
${
g
}
,
${
b
}
,
${
alpha
}
)`
;
}
public
contributeStyles
(
themeId
:
string
,
theme
Document
:
IThemeDocument
,
cssRules
:
string
[]):
void
{
const
theme
=
new
Theme
(
themeId
,
theme
Document
);
public
contributeStyles
(
themeId
:
string
,
theme
Settings
:
IThemeSetting
[]
,
cssRules
:
string
[]):
void
{
const
theme
=
new
Theme
(
themeId
,
theme
Settings
);
if
(
theme
.
hasGlobalSettings
())
{
const
keys
=
Object
.
keys
(
theme
.
getGlobalSettings
());
keys
.
filter
(
key
=>
key
.
indexOf
(
'
ansi
'
)
===
0
).
forEach
(
key
=>
{
...
...
src/vs/workbench/services/themes/electron-browser/themeService.ts
浏览文件 @
51ff4183
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录