Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fa1bcc90
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,发现更多精彩内容 >>
提交
fa1bcc90
编写于
5月 04, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Extract text area related CSS to textAreaHandler.css
上级
acff3d07
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
49 addition
and
48 deletion
+49
-48
src/vs/editor/browser/controller/textAreaHandler.css
src/vs/editor/browser/controller/textAreaHandler.css
+42
-0
src/vs/editor/browser/controller/textAreaHandler.ts
src/vs/editor/browser/controller/textAreaHandler.ts
+3
-3
src/vs/editor/browser/view/viewImpl.ts
src/vs/editor/browser/view/viewImpl.ts
+1
-2
src/vs/editor/browser/widget/media/editor.css
src/vs/editor/browser/widget/media/editor.css
+2
-42
src/vs/editor/common/view/editorColorRegistry.ts
src/vs/editor/common/view/editorColorRegistry.ts
+1
-1
未找到文件。
src/vs/editor/browser/controller/textAreaHandler.css
0 → 100644
浏览文件 @
fa1bcc90
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-editor
.inputarea
{
/*Chrome cannot handle typing in a 0x0 textarea*/
width
:
1px
;
height
:
1px
;
min-width
:
0
;
min-height
:
0
;
margin
:
0
;
padding
:
0
;
position
:
absolute
;
outline
:
none
!important
;
resize
:
none
;
border
:
none
;
overflow
:
hidden
;
}
/*.monaco-editor .inputarea {
position: fixed !important;
width: 800px !important;
height: 500px !important;
top: initial !important;
left: initial !important;
bottom: 0 !important;
right: 0 !important;
}*/
.monaco-editor.ff
.inputarea
,
.monaco-editor.ie
.inputarea
{
width
:
0
;
height
:
0
;
}
.monaco-editor
.ime-input.inputarea
{
z-index
:
10
;
}
.monaco-editor
.ime-input.inputarea
{
background
:
rgba
(
255
,
255
,
255
,
0.85
);
}
.monaco-editor.vs-dark
.ime-input.inputarea
{
background
:
rgba
(
0
,
0
,
0
,
0.65
);
}
src/vs/editor/browser/controller/textAreaHandler.ts
浏览文件 @
fa1bcc90
...
...
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
'
vs/css!./textAreaHandler
'
;
import
*
as
browser
from
'
vs/base/browser/browser
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
import
{
TextAreaInput
,
ITextAreaInputHost
,
IPasteData
,
ICompositionData
}
from
'
vs/editor/browser/controller/textAreaInput
'
;
...
...
@@ -24,7 +25,6 @@ import { Margin } from "vs/editor/browser/viewParts/margin/margin";
import
{
LineNumbersOverlay
}
from
"
vs/editor/browser/viewParts/lineNumbers/lineNumbers
"
;
export
interface
ITextAreaHandlerHelper
{
viewDomNode
:
FastDomNode
<
HTMLElement
>
;
visibleRangeForPositionRelativeToEditor
(
lineNumber
:
number
,
column
:
number
):
HorizontalRange
;
getVerticalOffsetForLineNumber
(
lineNumber
:
number
):
number
;
}
...
...
@@ -228,7 +228,7 @@ export class TextAreaHandler extends ViewEventHandler {
// Show the textarea
this
.
textArea
.
setHeight
(
this
.
_context
.
configuration
.
editor
.
lineHeight
);
this
.
_viewHelper
.
viewDomNode
.
addClassName
(
'
ime-input
'
);
this
.
textArea
.
setClassName
(
'
inputarea
ime-input
'
);
this
.
_viewController
.
compositionStart
(
'
keyboard
'
);
}));
...
...
@@ -261,7 +261,7 @@ export class TextAreaHandler extends ViewEventHandler {
this
.
textArea
.
unsetWidth
();
this
.
textArea
.
setLeft
(
0
);
this
.
textArea
.
setTop
(
0
);
this
.
_viewHelper
.
viewDomNode
.
removeClassName
(
'
ime-input
'
);
this
.
textArea
.
setClassName
(
'
inputarea
'
);
this
.
_visiblePosition
=
null
;
...
...
src/vs/editor/browser/view/viewImpl.ts
浏览文件 @
fa1bcc90
...
...
@@ -83,7 +83,7 @@ export class View extends ViewEventHandler {
private
readonly
_textAreaHandler
:
TextAreaHandler
;
private
readonly
pointerHandler
:
PointerHandler
;
private
outgoingEvents
:
ViewOutgoingEvents
;
private
readonly
outgoingEvents
:
ViewOutgoingEvents
;
// Dom nodes
private
linesContent
:
FastDomNode
<
HTMLElement
>
;
...
...
@@ -302,7 +302,6 @@ export class View extends ViewEventHandler {
private
createTextAreaHandlerHelper
():
ITextAreaHandlerHelper
{
return
{
viewDomNode
:
this
.
domNode
,
visibleRangeForPositionRelativeToEditor
:
(
lineNumber
:
number
,
column
:
number
)
=>
{
this
.
_flushAccumulatedAndRenderNow
();
let
visibleRanges
=
this
.
viewLines
.
visibleRangesForRange2
(
new
Range
(
lineNumber
,
column
,
lineNumber
,
column
));
...
...
src/vs/editor/browser/widget/media/editor.css
浏览文件 @
fa1bcc90
...
...
@@ -15,7 +15,7 @@
color
:
inherit
;
}
/* -------------------- Editor
, inputarea and background
-------------------- */
/* -------------------- Editor -------------------- */
.monaco-editor
{
position
:
relative
;
...
...
@@ -29,40 +29,8 @@
-webkit-font-feature-settings
:
"liga"
on
,
"calt"
on
;
font-feature-settings
:
"liga"
on
,
"calt"
on
;
}
.monaco-editor
.inputarea
{
/*Chrome cannot handle typing in a 0x0 textarea*/
width
:
1px
;
height
:
1px
;
min-width
:
0
;
min-height
:
0
;
margin
:
0
;
padding
:
0
;
position
:
absolute
;
outline
:
none
!important
;
resize
:
none
;
border
:
none
;
overflow
:
hidden
;
}
/*.monaco-editor .inputarea {
position: fixed !important;
width: 800px !important;
height: 200px !important;
top: initial !important;
left: initial !important;
bottom: 0 !important;
right: 0 !important;
}*/
.monaco-editor.ff
.inputarea
,
.monaco-editor.ie
.inputarea
{
width
:
0
;
height
:
0
;
}
.monaco-editor.ime-input
.inputarea
{
z-index
:
10
;
}
.monaco-editor
,
.monaco-editor
.inputarea
{
.monaco-editor
{
color
:
#333
;
/*
* WORKAROUND:
...
...
@@ -71,22 +39,14 @@
*/
background
:
#fffffe
;
}
.monaco-editor.ime-input
.inputarea
{
background
:
rgba
(
255
,
255
,
255
,
0.85
);
}
.monaco-editor.vs-dark
,
.monaco-editor.vs-dark
.inputarea
,
.monaco-editor.vs-dark
.zone-widget
.monaco-editor
{
color
:
#BBB
;
background
:
#1E1E1E
;
}
.monaco-editor.vs-dark.ime-input
.inputarea
{
background
:
rgba
(
0
,
0
,
0
,
0.65
);
}
.monaco-editor.hc-black
,
.monaco-editor.hc-black
.inputarea
,
.monaco-editor.hc-black
.zone-widget
.monaco-editor
{
color
:
#fff
;
background
:
#000
;
...
...
src/vs/editor/common/view/editorColorRegistry.ts
浏览文件 @
fa1bcc90
...
...
@@ -25,7 +25,7 @@ registerThemingParticipant((theme, collector) => {
let
background
=
theme
.
getColor
(
editorBackground
);
if
(
background
)
{
collector
.
addRule
(
`.monaco-editor.
${
theme
.
selector
}
.monaco-editor-background { background-color:
${
background
}
; }`
);
collector
.
addRule
(
`.monaco-editor.
${
theme
.
selector
}
.monaco-editor-background
, .monaco-editor.
${
theme
.
selector
}
.inputarea
{ background-color:
${
background
}
; }`
);
}
let
foreground
=
theme
.
getColor
(
editorForeground
);
if
(
foreground
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录