Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
3f647681
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,发现更多精彩内容 >>
提交
3f647681
编写于
4月 27, 2020
作者:
M
Miguel Solorio
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polish notebook margins
上级
2ace2ab2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
11 addition
and
10 deletion
+11
-10
src/vs/workbench/contrib/notebook/browser/constants.ts
src/vs/workbench/contrib/notebook/browser/constants.ts
+1
-1
src/vs/workbench/contrib/notebook/browser/media/notebook.css
src/vs/workbench/contrib/notebook/browser/media/notebook.css
+3
-2
src/vs/workbench/contrib/notebook/browser/notebookEditor.ts
src/vs/workbench/contrib/notebook/browser/notebookEditor.ts
+2
-2
src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts
...ntrib/notebook/browser/view/renderers/backLayerWebView.ts
+2
-2
src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts
...h/contrib/notebook/browser/viewModel/codeCellViewModel.ts
+2
-2
src/vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel.ts
...ntrib/notebook/browser/viewModel/markdownCellViewModel.ts
+1
-1
未找到文件。
src/vs/workbench/contrib/notebook/browser/constants.ts
浏览文件 @
3f647681
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Cell sizing related
export
const
CELL_MARGIN
=
12
;
export
const
CELL_MARGIN
=
20
;
export
const
CELL_RUN_GUTTER
=
32
;
export
const
EDITOR_TOOLBAR_HEIGHT
=
0
;
...
...
src/vs/workbench/contrib/notebook/browser/media/notebook.css
浏览文件 @
3f647681
...
...
@@ -179,8 +179,8 @@
display
:
inline-block
;
position
:
absolute
;
height
:
26px
;
right
:
5
6px
;
top
:
-1
6px
;
right
:
3
6px
;
top
:
-1
4px
;
/* this lines up the bottom toolbar border with the current line when on line 01 */
z-index
:
10
;
}
...
...
@@ -249,6 +249,7 @@
.monaco-workbench
.part.editor
>
.content
.notebook-editor
>
.cell-list-container
>
.monaco-list
>
.monaco-scrollable-element
>
.monaco-list-rows
>
.monaco-list-row
.cell
.run-button-container
{
position
:
relative
;
height
:
22px
;
flex-shrink
:
0
;
}
.monaco-workbench
.part.editor
>
.content
.notebook-editor
>
.cell-list-container
>
.monaco-list
>
.monaco-scrollable-element
>
.monaco-list-rows
>
.monaco-list-row
.cell
.run-button-container
.monaco-toolbar
{
...
...
src/vs/workbench/contrib/notebook/browser/notebookEditor.ts
浏览文件 @
3f647681
...
...
@@ -1022,7 +1022,7 @@ export const focusedCellIndicator = registerColor('notebook.focusedCellIndicator
export
const
notebookOutputContainerColor
=
registerColor
(
'
notebook.outputContainerBackgroundColor
'
,
{
dark
:
new
Color
(
new
RGBA
(
255
,
255
,
255
,
0.06
)),
light
:
new
Color
(
new
RGBA
(
2
28
,
230
,
241
)),
light
:
new
Color
(
new
RGBA
(
2
37
,
239
,
249
)),
hc
:
null
}
,
nls
.
localize
(
'
notebook.outputContainerBackgroundColor
'
,
"
The Color of the notebook output container background.
"
));
...
...
@@ -1108,7 +1108,7 @@ registerThemingParticipant((theme, collector) => {
// }
// Cell Margin
collector
.
addRule
(
`.monaco-workbench .part.editor > .content .notebook-editor .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row > div.cell { margin: 0px
${
CELL_MARGIN
+
CELL_RUN_GUTTER
}
px 0px
${
CELL_MARGIN
}
px; }`
);
collector
.
addRule
(
`.monaco-workbench .part.editor > .content .notebook-editor .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row > div.cell { margin: 0px
${
CELL_MARGIN
}
px 0px
${
CELL_MARGIN
}
px; }`
);
collector
.
addRule
(
`.monaco-workbench .part.editor > .content .notebook-editor .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row { padding-top:
${
EDITOR_TOP_MARGIN
}
px; }`
);
collector
.
addRule
(
`.monaco-workbench .part.editor > .content .notebook-editor .output { margin: 0px
${
CELL_MARGIN
+
CELL_RUN_GUTTER
}
px 0px
${
CELL_MARGIN
+
CELL_RUN_GUTTER
}
px }`
);
collector
.
addRule
(
`.monaco-workbench .part.editor > .content .notebook-editor .cell-bottom-toolbar-container { width: calc(100% -
${
CELL_MARGIN
*
2
+
CELL_RUN_GUTTER
}
px); margin: 0px
${
CELL_MARGIN
}
px 0px
${
CELL_MARGIN
+
CELL_RUN_GUTTER
}
px }`
);
...
...
src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts
浏览文件 @
3f647681
...
...
@@ -120,7 +120,7 @@ export class BackLayerWebView extends Disposable {
super
();
this
.
element
=
document
.
createElement
(
'
div
'
);
this
.
element
.
style
.
width
=
`calc(100% -
${
(
CELL_MARGIN
+
CELL_RUN_GUTTER
)
*
2
}
px)`
;
this
.
element
.
style
.
width
=
`calc(100% -
${
CELL_MARGIN
*
2
+
CELL_RUN_GUTTER
}
px)`
;
this
.
element
.
style
.
height
=
'
1400px
'
;
this
.
element
.
style
.
position
=
'
absolute
'
;
this
.
element
.
style
.
margin
=
`0px 0 0px
${
CELL_MARGIN
+
CELL_RUN_GUTTER
}
px`
;
...
...
@@ -170,7 +170,7 @@ ${loaderJs}
width: 100%;
padding:
${
outputNodePadding
}
px;
box-sizing: border-box;
background-color: var(--vscode-
list-inactiveSelectionBackground
);
background-color: var(--vscode-
notebook-outputContainerBackgroundColor
);
}
body {
padding: 0px;
...
...
src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts
浏览文件 @
3f647681
...
...
@@ -86,7 +86,7 @@ export class CodeCellViewModel extends BaseCellViewModel implements ICellViewMod
this
.
_layoutInfo
=
{
fontInfo
:
initialNotebookLayoutInfo
?.
fontInfo
||
null
,
editorHeight
:
0
,
editorWidth
:
initialNotebookLayoutInfo
?
initialNotebookLayoutInfo
!
.
width
-
(
CELL_MARGIN
+
CELL_RUN_GUTTER
)
*
2
:
0
,
editorWidth
:
initialNotebookLayoutInfo
?
initialNotebookLayoutInfo
!
.
width
-
(
CELL_MARGIN
*
2
)
+
CELL_RUN_GUTTER
:
0
,
outputContainerOffset
:
0
,
outputTotalHeight
:
0
,
totalHeight
:
0
,
...
...
@@ -103,7 +103,7 @@ export class CodeCellViewModel extends BaseCellViewModel implements ICellViewMod
const
indicatorHeight
=
this
.
editorHeight
+
CELL_STATUSBAR_HEIGHT
+
outputTotalHeight
;
const
outputContainerOffset
=
EDITOR_TOOLBAR_HEIGHT
+
EDITOR_TOP_MARGIN
+
this
.
editorHeight
+
CELL_STATUSBAR_HEIGHT
;
const
bottomToolbarOffset
=
totalHeight
-
BOTTOM_CELL_TOOLBAR_HEIGHT
;
const
editorWidth
=
state
.
outerWidth
!==
undefined
?
state
.
outerWidth
-
(
CELL_MARGIN
+
CELL_RUN_GUTTER
)
*
2
:
this
.
_layoutInfo
?.
editorWidth
;
const
editorWidth
=
state
.
outerWidth
!==
undefined
?
state
.
outerWidth
-
(
CELL_MARGIN
*
2
+
CELL_RUN_GUTTER
)
:
this
.
_layoutInfo
?.
editorWidth
;
this
.
_layoutInfo
=
{
fontInfo
:
state
.
font
||
null
,
editorHeight
:
this
.
_editorHeight
,
...
...
src/vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel.ts
浏览文件 @
3f647681
...
...
@@ -71,7 +71,7 @@ export class MarkdownCellViewModel extends BaseCellViewModel implements ICellVie
}
private
computeEditorWidth
(
outerWidth
:
number
)
{
return
outerWidth
-
CELL_MARGIN
*
2
-
CELL_RUN_GUTTER
*
2
;
return
outerWidth
-
(
CELL_MARGIN
*
2
)
-
CELL_RUN_GUTTER
;
}
layoutChange
(
state
:
MarkdownCellLayoutChangeEvent
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录