Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
19c85f88
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
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,发现更多精彩内容 >>
提交
19c85f88
编写于
2月 11, 2019
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
for rapid render data use a file, not storage, #68395
上级
2eb40a88
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
18 deletion
+24
-18
src/vs/code/electron-browser/workbench/workbench.js
src/vs/code/electron-browser/workbench/workbench.js
+6
-4
src/vs/code/electron-main/window.ts
src/vs/code/electron-main/window.ts
+1
-3
src/vs/platform/windows/common/windows.ts
src/vs/platform/windows/common/windows.ts
+1
-1
src/vs/workbench/contrib/splash/electron-browser/partsSplash.contribution.ts
...ntrib/splash/electron-browser/partsSplash.contribution.ts
+16
-10
未找到文件。
src/vs/code/electron-browser/workbench/workbench.js
浏览文件 @
19c85f88
...
...
@@ -56,10 +56,12 @@ function showPartsSplash(configuration) {
perf
.
mark
(
'
willShowPartsSplash
'
);
let
data
;
try
{
data
=
JSON
.
parse
(
configuration
.
partsSplashData
);
}
catch
(
e
)
{
// ignore
if
(
typeof
configuration
.
partsSplashPath
===
'
string
'
)
{
try
{
data
=
JSON
.
parse
(
require
(
'
fs
'
).
readFileSync
(
configuration
.
partsSplashPath
,
'
utf8
'
));
}
catch
(
e
)
{
// ignore
}
}
// high contrast mode has been turned on from the outside, e.g OS -> ignore stored colors and layouts
...
...
src/vs/code/electron-main/window.ts
浏览文件 @
19c85f88
...
...
@@ -24,7 +24,6 @@ import { ISerializableCommandAction } from 'vs/platform/actions/common/actions';
import
*
as
perf
from
'
vs/base/common/performance
'
;
import
{
resolveMarketplaceHeaders
}
from
'
vs/platform/extensionManagement/node/extensionGalleryService
'
;
import
{
getBackgroundColor
}
from
'
vs/code/electron-main/theme
'
;
import
{
IStorageMainService
}
from
'
vs/platform/storage/node/storageMainService
'
;
import
{
RunOnceScheduler
}
from
'
vs/base/common/async
'
;
export
interface
IWindowCreationOptions
{
...
...
@@ -87,7 +86,6 @@ export class CodeWindow extends Disposable implements ICodeWindow {
@
IStateService
private
readonly
stateService
:
IStateService
,
@
IWorkspacesMainService
private
readonly
workspacesMainService
:
IWorkspacesMainService
,
@
IBackupMainService
private
readonly
backupMainService
:
IBackupMainService
,
@
IStorageMainService
private
readonly
storageMainService
:
IStorageMainService
)
{
super
();
...
...
@@ -590,7 +588,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
windowConfiguration
.
perfEntries
=
perf
.
exportEntries
();
// Parts splash
windowConfiguration
.
partsSplash
Data
=
this
.
storageMainService
.
get
(
'
parts-splash-data
'
,
undefined
);
windowConfiguration
.
partsSplash
Path
=
path
.
join
(
this
.
environmentService
.
userDataPath
,
'
rapid_render.json
'
);
// Config (combination of process.argv and window configuration)
const
environment
=
parseArgs
(
process
.
argv
);
...
...
src/vs/platform/windows/common/windows.ts
浏览文件 @
19c85f88
...
...
@@ -395,7 +395,7 @@ export interface IWindowConfiguration extends ParsedArgs {
highContrast
?:
boolean
;
frameless
?:
boolean
;
accessibilitySupport
?:
boolean
;
partsSplash
Data
?:
string
;
partsSplash
Path
?:
string
;
perfStartTime
?:
number
;
perfAppReady
?:
number
;
...
...
src/vs/workbench/contrib/splash/electron-browser/partsSplash.contribution.ts
浏览文件 @
19c85f88
...
...
@@ -11,7 +11,6 @@ import { dispose, IDisposable } from 'vs/base/common/lifecycle';
import
{
IBroadcastService
}
from
'
vs/workbench/services/broadcast/electron-browser/broadcastService
'
;
import
{
ILifecycleService
,
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
ColorIdentifier
,
editorBackground
,
foreground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
getThemeTypeSelector
,
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
DEFAULT_EDITOR_MIN_DIMENSIONS
}
from
'
vs/workbench/browser/parts/editor/editor
'
;
...
...
@@ -19,6 +18,9 @@ import { Extensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common
import
*
as
themes
from
'
vs/workbench/common/theme
'
;
import
{
IPartService
,
Parts
,
Position
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
join
}
from
'
vs/base/common/paths
'
;
class
PartsSplash
{
...
...
@@ -32,10 +34,10 @@ class PartsSplash {
constructor
(
@
IThemeService
private
readonly
_themeService
:
IThemeService
,
@
IPartService
private
readonly
_partService
:
IPartService
,
@
I
StorageService
private
readonly
_storageService
:
IStorag
eService
,
@
I
FileService
private
readonly
_fileService
:
IFil
eService
,
@
IEnvironmentService
private
readonly
_envService
:
IEnvironmentService
,
@
IBroadcastService
private
readonly
_broadcastService
:
IBroadcastService
,
@
ILifecycleService
lifecycleService
:
ILifecycleService
,
@
IBroadcastService
private
readonly
broadcastService
:
IBroadcastService
)
{
lifecycleService
.
when
(
LifecyclePhase
.
Restored
).
then
(
_
=>
this
.
_removePartsSplash
());
Event
.
debounce
(
Event
.
any
<
any
>
(
...
...
@@ -67,12 +69,16 @@ class PartsSplash {
sideBarWidth
:
getTotalWidth
(
this
.
_partService
.
getContainer
(
Parts
.
SIDEBAR_PART
)
!
),
statusBarHeight
:
getTotalHeight
(
this
.
_partService
.
getContainer
(
Parts
.
STATUSBAR_PART
)
!
),
};
this
.
_storageService
.
store
(
'
parts-splash-data
'
,
JSON
.
stringify
({
id
:
PartsSplash
.
_splashElementId
,
colorInfo
,
layoutInfo
,
baseTheme
}),
StorageScope
.
GLOBAL
);
this
.
_fileService
.
updateContent
(
URI
.
file
(
join
(
this
.
_envService
.
userDataPath
,
'
rapid_render.json
'
)),
JSON
.
stringify
({
id
:
PartsSplash
.
_splashElementId
,
colorInfo
,
layoutInfo
,
baseTheme
}),
{
encoding
:
'
utf8
'
}
);
if
(
baseTheme
!==
this
.
_lastBaseTheme
||
colorInfo
.
editorBackground
!==
this
.
_lastBackground
)
{
// notify the main window on background color changes: the main window sets the background color to new windows
...
...
@@ -81,7 +87,7 @@ class PartsSplash {
// the color needs to be in hex
const
backgroundColor
=
this
.
_themeService
.
getTheme
().
getColor
(
editorBackground
)
||
themes
.
WORKBENCH_BACKGROUND
(
this
.
_themeService
.
getTheme
());
this
.
broadcastService
.
broadcast
({
channel
:
'
vscode:changeColorTheme
'
,
payload
:
JSON
.
stringify
({
baseTheme
,
background
:
Color
.
Format
.
CSS
.
formatHex
(
backgroundColor
)
})
});
this
.
_
broadcastService
.
broadcast
({
channel
:
'
vscode:changeColorTheme
'
,
payload
:
JSON
.
stringify
({
baseTheme
,
background
:
Color
.
Format
.
CSS
.
formatHex
(
backgroundColor
)
})
});
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录