Skip to content

Commit c1cf875

Browse files
committed
Move cell collapse indicator to same vertical space as run cell
1 parent 97e0239 commit c1cf875

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,10 @@
212212
}
213213

214214
.monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-collapsed-part {
215+
position: relative;
215216
cursor: pointer;
216217
box-sizing: border-box;
217-
padding-left: 2px;
218+
padding-left: 5px;
218219
}
219220

220221
.monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-collapsed-part .codicon {

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,16 +1706,13 @@ registerThemingParticipant((theme, collector) => {
17061706
if (focusedCellBackgroundColor) {
17071707
collector.addRule(`.notebookOverlay .code-cell-row.focused .cell-focus-indicator,
17081708
.notebookOverlay .markdown-cell-row.focused { background-color: ${focusedCellBackgroundColor} !important; }`);
1709-
collector.addRule(`.notebookOverlay .code-cell-row.focused.collapsed .cell-collapsed-part { background-color: ${focusedCellBackgroundColor} !important; }`);
17101709
}
17111710

17121711
const cellHoverBackgroundColor = theme.getColor(cellHoverBackground);
17131712
if (cellHoverBackgroundColor) {
17141713
collector.addRule(`.notebookOverlay .code-cell-row:not(.focused):hover .cell-focus-indicator,
17151714
.notebookOverlay .code-cell-row:not(.focused).cell-output-hover .cell-focus-indicator,
17161715
.notebookOverlay .markdown-cell-row:not(.focused):hover { background-color: ${cellHoverBackgroundColor} !important; }`);
1717-
collector.addRule(`.notebookOverlay .code-cell-row:not(.focused).cell-output-hover .cell-collapsed-part,
1718-
.notebookOverlay .code-cell-row:not(.focused):hover.collapsed .cell-collapsed-part { background-color: ${cellHoverBackgroundColor} !important; }`);
17191716
}
17201717

17211718
const focusedCellBorderColor = theme.getColor(focusedCellBorder);
@@ -1804,8 +1801,9 @@ registerThemingParticipant((theme, collector) => {
18041801
collector.addRule(`.notebookOverlay .monaco-list .monaco-list-row.code-cell-row .cell-focus-indicator-left { width: ${CODE_CELL_LEFT_MARGIN + CELL_RUN_GUTTER}px; }`);
18051802
collector.addRule(`.notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row .cell-focus-indicator-left { width: ${CODE_CELL_LEFT_MARGIN}px; }`);
18061803
collector.addRule(`.notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator.cell-focus-indicator-right { width: ${CELL_MARGIN * 2}px; }`);
1804+
collector.addRule(`.notebookOverlay .monaco-list .monaco-list-row.collapsed .cell-focus-indicator.cell-focus-indicator-right { width: initial; left: ${CODE_CELL_LEFT_MARGIN + CELL_RUN_GUTTER}px }`);
18071805
collector.addRule(`.notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-bottom { height: ${CELL_BOTTOM_MARGIN}px; }`);
18081806
collector.addRule(`.notebookOverlay .monaco-list .monaco-list-row .cell-shadow-container-bottom { top: ${CELL_BOTTOM_MARGIN}px; }`);
18091807

1810-
collector.addRule(`.monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.collapsed .cell-collapsed-part { margin-left: ${CODE_CELL_LEFT_MARGIN + CELL_RUN_GUTTER}px; height: ${COLLAPSED_INDICATOR_HEIGHT}px; }`);
1808+
collector.addRule(`.monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-collapsed-part { margin-left: ${CODE_CELL_LEFT_MARGIN}px; height: ${COLLAPSED_INDICATOR_HEIGHT}px; }`);
18111809
});

0 commit comments

Comments
 (0)