Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
95e4e7a1
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,发现更多精彩内容 >>
提交
95e4e7a1
编写于
4月 07, 2020
作者:
J
jeanp413
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Center repl input chevron
上级
7c5b7049
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
26 addition
and
19 deletion
+26
-19
src/vs/workbench/contrib/debug/browser/media/repl.css
src/vs/workbench/contrib/debug/browser/media/repl.css
+10
-10
src/vs/workbench/contrib/debug/browser/repl.ts
src/vs/workbench/contrib/debug/browser/repl.ts
+16
-9
未找到文件。
src/vs/workbench/contrib/debug/browser/media/repl.css
浏览文件 @
95e4e7a1
...
@@ -79,7 +79,8 @@
...
@@ -79,7 +79,8 @@
}
}
.repl
.repl-input-wrapper
{
.repl
.repl-input-wrapper
{
padding-left
:
20px
;
display
:
flex
;
align-items
:
center
;
border-top
:
1px
solid
rgba
(
128
,
128
,
128
,
0.35
);
border-top
:
1px
solid
rgba
(
128
,
128
,
128
,
0.35
);
}
}
...
@@ -92,15 +93,14 @@
...
@@ -92,15 +93,14 @@
border-top-color
:
#6FC3DF
;
border-top-color
:
#6FC3DF
;
}
}
.repl
.repl-input-wrapper
:before
{
.repl
.repl-input-wrapper
.repl-input-chevron
{
left
:
8px
;
padding
:
0
6px
0
8px
;
position
:
absolute
;
width
:
16px
;
content
:
'\276f'
;
height
:
100%
;
line-height
:
18px
;
display
:
flex
;
}
flex-shrink
:
0
;
justify-content
:
center
;
.monaco-workbench.linux
.repl
.repl-input-wrapper
:before
{
font-weight
:
600
;
font-size
:
9px
;
}
}
/* Output coloring and styling */
/* Output coloring and styling */
...
...
src/vs/workbench/contrib/debug/browser/repl.ts
浏览文件 @
95e4e7a1
...
@@ -58,7 +58,7 @@ import { IViewsService, IViewDescriptorService } from 'vs/workbench/common/views
...
@@ -58,7 +58,7 @@ import { IViewsService, IViewDescriptorService } from 'vs/workbench/common/views
import
{
IOpenerService
}
from
'
vs/platform/opener/common/opener
'
;
import
{
IOpenerService
}
from
'
vs/platform/opener/common/opener
'
;
import
{
ReplGroup
}
from
'
vs/workbench/contrib/debug/common/replModel
'
;
import
{
ReplGroup
}
from
'
vs/workbench/contrib/debug/common/replModel
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
EDITOR_FONT_DEFAULTS
}
from
'
vs/editor/common/config/editorOptions
'
;
import
{
EDITOR_FONT_DEFAULTS
,
EditorOption
}
from
'
vs/editor/common/config/editorOptions
'
;
const
$
=
dom
.
$
;
const
$
=
dom
.
$
;
...
@@ -284,6 +284,14 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
...
@@ -284,6 +284,14 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
const
lineHeight
=
debugConsole
.
lineHeight
?
`
${
debugConsole
.
lineHeight
}
px`
:
'
1.4em
'
;
const
lineHeight
=
debugConsole
.
lineHeight
?
`
${
debugConsole
.
lineHeight
}
px`
:
'
1.4em
'
;
const
backgroundColor
=
this
.
themeService
.
getColorTheme
().
getColor
(
this
.
getBackgroundColor
());
const
backgroundColor
=
this
.
themeService
.
getColorTheme
().
getColor
(
this
.
getBackgroundColor
());
this
.
replInput
.
updateOptions
({
fontSize
,
lineHeight
:
debugConsole
.
lineHeight
,
fontFamily
:
debugConsole
.
fontFamily
===
'
default
'
?
EDITOR_FONT_DEFAULTS
.
fontFamily
:
debugConsole
.
fontFamily
});
const
replInputLineHeight
=
this
.
replInput
.
getOption
(
EditorOption
.
lineHeight
);
// Set the font size, font family, line height and align the twistie to be centered, and input theme color
// Set the font size, font family, line height and align the twistie to be centered, and input theme color
this
.
styleElement
.
innerHTML
=
`
this
.
styleElement
.
innerHTML
=
`
.repl .repl-tree .expression {
.repl .repl-tree .expression {
...
@@ -299,6 +307,10 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
...
@@ -299,6 +307,10 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
background-position-y: calc(100% -
${
fontSize
*
1.4
/
2
-
8
}
px);
background-position-y: calc(100% -
${
fontSize
*
1.4
/
2
-
8
}
px);
}
}
.repl .repl-input-wrapper .repl-input-chevron {
line-height:
${
replInputLineHeight
}
px
}
.repl .repl-input-wrapper .monaco-editor .lines-content {
.repl .repl-input-wrapper .monaco-editor .lines-content {
background-color:
${
backgroundColor
}
;
background-color:
${
backgroundColor
}
;
}
}
...
@@ -306,12 +318,6 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
...
@@ -306,12 +318,6 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
this
.
tree
.
rerender
();
this
.
tree
.
rerender
();
this
.
replInput
.
updateOptions
({
fontSize
,
lineHeight
:
debugConsole
.
lineHeight
,
fontFamily
:
debugConsole
.
fontFamily
===
'
default
'
?
EDITOR_FONT_DEFAULTS
.
fontFamily
:
debugConsole
.
fontFamily
});
if
(
this
.
dimension
)
{
if
(
this
.
dimension
)
{
this
.
layoutBody
(
this
.
dimension
.
height
,
this
.
dimension
.
width
);
this
.
layoutBody
(
this
.
dimension
.
height
,
this
.
dimension
.
width
);
}
}
...
@@ -406,7 +412,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
...
@@ -406,7 +412,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
protected
layoutBody
(
height
:
number
,
width
:
number
):
void
{
protected
layoutBody
(
height
:
number
,
width
:
number
):
void
{
this
.
dimension
=
new
dom
.
Dimension
(
width
,
height
);
this
.
dimension
=
new
dom
.
Dimension
(
width
,
height
);
const
replInputHeight
=
this
.
replInput
.
getContentHeight
(
);
const
replInputHeight
=
Math
.
min
(
this
.
replInput
.
getContentHeight
(),
height
);
if
(
this
.
tree
)
{
if
(
this
.
tree
)
{
const
lastElementVisible
=
this
.
tree
.
scrollTop
+
this
.
tree
.
renderHeight
>=
this
.
tree
.
scrollHeight
;
const
lastElementVisible
=
this
.
tree
.
scrollTop
+
this
.
tree
.
renderHeight
>=
this
.
tree
.
scrollHeight
;
const
treeHeight
=
height
-
replInputHeight
;
const
treeHeight
=
height
-
replInputHeight
;
...
@@ -418,7 +424,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
...
@@ -418,7 +424,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
}
}
this
.
replInputContainer
.
style
.
height
=
`
${
replInputHeight
}
px`
;
this
.
replInputContainer
.
style
.
height
=
`
${
replInputHeight
}
px`
;
this
.
replInput
.
layout
({
width
:
width
-
2
0
,
height
:
replInputHeight
});
this
.
replInput
.
layout
({
width
:
width
-
3
0
,
height
:
replInputHeight
});
}
}
focus
():
void
{
focus
():
void
{
...
@@ -553,6 +559,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
...
@@ -553,6 +559,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
private
createReplInput
(
container
:
HTMLElement
):
void
{
private
createReplInput
(
container
:
HTMLElement
):
void
{
this
.
replInputContainer
=
dom
.
append
(
container
,
$
(
'
.repl-input-wrapper
'
));
this
.
replInputContainer
=
dom
.
append
(
container
,
$
(
'
.repl-input-wrapper
'
));
dom
.
append
(
this
.
replInputContainer
,
$
(
'
.repl-input-chevron.codicon.codicon-chevron-right
'
));
const
{
scopedContextKeyService
,
historyNavigationEnablement
}
=
createAndBindHistoryNavigationWidgetScopedContextKeyService
(
this
.
contextKeyService
,
{
target
:
this
.
replInputContainer
,
historyNavigator
:
this
});
const
{
scopedContextKeyService
,
historyNavigationEnablement
}
=
createAndBindHistoryNavigationWidgetScopedContextKeyService
(
this
.
contextKeyService
,
{
target
:
this
.
replInputContainer
,
historyNavigator
:
this
});
this
.
historyNavigationEnablement
=
historyNavigationEnablement
;
this
.
historyNavigationEnablement
=
historyNavigationEnablement
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录