Skip to content

Commit fe3cab2

Browse files
committed
compute position/width of output action bar.
1 parent af14bf6 commit fe3cab2

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/vs/workbench/contrib/notebook/browser/media/notebook.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,13 @@
263263
position: absolute;
264264
top: 4px;
265265
left: -32px;
266-
width: 16px;
267266
height: 16px;
268267
cursor: pointer;
269-
padding: 6px;
268+
padding: 6px 0px;
269+
}
270+
271+
.monaco-workbench .notebookOverlay .output .cell-output-toolbar .actions-container {
272+
justify-content: center;
270273
}
271274

272275
.monaco-workbench .notebookOverlay .output pre {

src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
556556
cellRunGutter,
557557
cellBottomMargin,
558558
codeCellLeftMargin,
559+
markdownCellLeftMargin,
559560
markdownCellBottomMargin,
560561
markdownCellTopMargin,
561562
bottomToolbarGap: bottomCellToolbarGap,
@@ -717,12 +718,17 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
717718
styleSheets.push(`.notebookOverlay .output { margin: 0px ${cellRightMargin}px 0px ${codeCellLeftMargin + cellRunGutter}px; }`);
718719
styleSheets.push(`.notebookOverlay .output { width: calc(100% - ${codeCellLeftMargin + cellRunGutter + cellRightMargin}px); }`);
719720

721+
// output toolbar
722+
styleSheets.push(`.monaco-workbench .notebookOverlay .output .cell-output-toolbar { left: -${cellRunGutter}px; }`);
723+
styleSheets.push(`.monaco-workbench .notebookOverlay .output .cell-output-toolbar { width: ${cellRunGutter}px; }`);
724+
720725
styleSheets.push(`.notebookOverlay .output-show-more-container { margin: 0px ${cellRightMargin}px 0px ${codeCellLeftMargin + cellRunGutter}px; }`);
721726
styleSheets.push(`.notebookOverlay .output-show-more-container { width: calc(100% - ${codeCellLeftMargin + cellRunGutter + cellRightMargin}px); }`);
722-
723-
styleSheets.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row div.cell.markdown { padding-left: ${cellRunGutter}px; }`);
724727
styleSheets.push(`.notebookOverlay .cell .run-button-container { width: ${cellRunGutter}px; left: ${codeCellLeftMargin}px }`);
725728
styleSheets.push(`.monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .execution-count-label { left: ${codeCellLeftMargin}px; width: ${cellRunGutter}px; }`);
729+
730+
styleSheets.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row div.cell.markdown { padding-left: ${cellRunGutter}px; }`);
731+
styleSheets.push(`.monaco-workbench .notebookOverlay > .cell-list-container .notebook-folding-indicator { left: ${(markdownCellLeftMargin - 20) / 2}px; }`);
726732
styleSheets.push(`.notebookOverlay .monaco-list .monaco-list-row :not(.webview-backed-markdown-cell) .cell-focus-indicator-top { height: ${cellTopMargin}px; }`);
727733
styleSheets.push(`.notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-side { bottom: ${bottomCellToolbarGap}px; }`);
728734
styleSheets.push(`.notebookOverlay .monaco-list .monaco-list-row.code-cell-row .cell-focus-indicator-left,

0 commit comments

Comments
 (0)