From 3b8c6c6519189639a0f1694ac19fc24d05d8970c Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 26 Mar 2020 13:40:38 -0700 Subject: [PATCH] padding adjustment for output in webview --- .../contrib/notebook/browser/notebookBrowser.ts | 1 + .../workbench/contrib/notebook/browser/notebookEditor.ts | 2 +- .../notebook/browser/view/renderers/backLayerWebView.ts | 9 ++++----- .../notebook/browser/view/renderers/cellRenderer.ts | 6 ++++-- .../contrib/notebook/browser/view/renderers/codeCell.ts | 2 +- .../notebook/browser/viewModel/codeCellViewModel.ts | 5 ++++- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts b/src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts index 0561b30203a..c3aa3836e7f 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts @@ -40,6 +40,7 @@ export interface CodeCellLayoutInfo { readonly editorHeight: number; readonly editorWidth: number; readonly totalHeight: number; + readonly outputContainerOffset: number; readonly outputTotalHeight: number; readonly indicatorHeight: number; } diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts index 124f909826f..3d35de9dcfd 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts @@ -792,7 +792,7 @@ registerThemingParticipant((theme, collector) => { // Cell Margin collector.addRule(`.monaco-workbench .part.editor > .content .notebook-editor .monaco-list-row > div.cell { margin: 8px ${CELL_MARGIN}px 0px ${CELL_MARGIN}px; }`); - collector.addRule(`.monaco-workbench .part.editor > .content .notebook-editor .output { margin: 0px ${CELL_MARGIN}px 8px ${CELL_MARGIN + CELL_RUN_GUTTER}px }`); + collector.addRule(`.monaco-workbench .part.editor > .content .notebook-editor .output { margin: 0px ${CELL_MARGIN}px 0px ${CELL_MARGIN + CELL_RUN_GUTTER}px }`); collector.addRule(`.monaco-workbench .part.editor > .content .notebook-editor .cell .cell-editor-container { width: calc(100% - ${CELL_RUN_GUTTER}px); }`); collector.addRule(`.monaco-workbench .part.editor > .content .notebook-editor .monaco-list-row > div.cell.markdown { padding-left: ${CELL_RUN_GUTTER}px; }`); diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts index 0d46ae98b84..5274d668ed6 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts @@ -112,8 +112,7 @@ export class BackLayerWebView extends Disposable {