Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d6e80052
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,发现更多精彩内容 >>
提交
d6e80052
编写于
5月 12, 2017
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
editorScrollbar: move off editor.viewInfo.theme
上级
c754761c
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
15 addition
and
4 deletion
+15
-4
src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts
...itor/browser/viewParts/editorScrollbar/editorScrollbar.ts
+7
-4
src/vs/platform/theme/common/themeService.ts
src/vs/platform/theme/common/themeService.ts
+8
-0
未找到文件。
src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts
浏览文件 @
d6e80052
...
...
@@ -13,6 +13,7 @@ import { ViewContext } from 'vs/editor/common/view/viewContext';
import
*
as
viewEvents
from
'
vs/editor/common/view/viewEvents
'
;
import
{
RenderingContext
,
RestrictedRenderingContext
}
from
'
vs/editor/common/view/renderingContext
'
;
import
{
FastDomNode
,
createFastDomNode
}
from
'
vs/base/browser/fastDomNode
'
;
import
{
getThemeTypeSelector
}
from
"
vs/platform/theme/common/themeService
"
;
export
class
EditorScrollbar
extends
ViewPart
{
...
...
@@ -33,7 +34,7 @@ export class EditorScrollbar extends ViewPart {
let
scrollbarOptions
:
ScrollableElementCreationOptions
=
{
canUseTranslate3d
:
editor
.
canUseTranslate3d
,
listenOnDomNode
:
viewDomNode
.
domNode
,
className
:
'
editor-scrollable
'
+
'
'
+
editor
.
viewInfo
.
theme
,
className
:
'
editor-scrollable
'
+
'
'
+
getThemeTypeSelector
(
context
.
theme
.
type
)
,
useShadows
:
false
,
lazyRender
:
true
,
...
...
@@ -120,10 +121,8 @@ export class EditorScrollbar extends ViewPart {
// --- begin event handlers
public
onConfigurationChanged
(
e
:
viewEvents
.
ViewConfigurationChangedEvent
):
boolean
{
const
editor
=
this
.
_context
.
configuration
.
editor
;
this
.
scrollbar
.
updateClassName
(
'
editor-scrollable
'
+
'
'
+
editor
.
viewInfo
.
theme
);
if
(
e
.
viewInfo
||
e
.
canUseTranslate3d
)
{
const
editor
=
this
.
_context
.
configuration
.
editor
;
let
newOpts
:
ScrollableElementChangeOptions
=
{
canUseTranslate3d
:
editor
.
canUseTranslate3d
,
handleMouseWheel
:
editor
.
viewInfo
.
scrollbar
.
handleMouseWheel
,
...
...
@@ -139,6 +138,10 @@ export class EditorScrollbar extends ViewPart {
public
onScrollChanged
(
e
:
viewEvents
.
ViewScrollChangedEvent
):
boolean
{
return
true
;
}
public
onThemeChanged
(
e
:
viewEvents
.
ViewThemeChangedEvent
):
boolean
{
this
.
scrollbar
.
updateClassName
(
'
editor-scrollable
'
+
'
'
+
getThemeTypeSelector
(
this
.
_context
.
theme
.
type
));
return
true
;
}
// --- end event handlers
...
...
src/vs/platform/theme/common/themeService.ts
浏览文件 @
d6e80052
...
...
@@ -19,6 +19,14 @@ export const LIGHT = 'light';
export
const
HIGH_CONTRAST
=
'
hc
'
;
export
type
ThemeType
=
'
light
'
|
'
dark
'
|
'
hc
'
;
export
function
getThemeTypeSelector
(
type
:
ThemeType
):
string
{
switch
(
type
)
{
case
DARK
:
return
'
vs-dark
'
;
case
HIGH_CONTRAST
:
return
'
hc-black
'
;
default
:
return
'
vs
'
;
}
}
export
interface
ITheme
{
readonly
type
:
ThemeType
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录