From 2dcfd096341d00d4a8ca057ed4af0c01f4579ff5 Mon Sep 17 00:00:00 2001 From: rebornix Date: Tue, 27 Jul 2021 11:46:46 -0700 Subject: [PATCH] polish insert toolbar height and hover feedback. --- .../contrib/notebook/browser/media/notebook.css | 9 +++++++-- .../workbench/contrib/notebook/common/notebookOptions.ts | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/notebook/browser/media/notebook.css b/src/vs/workbench/contrib/notebook/browser/media/notebook.css index 0a01ec37732..7baba7136b1 100644 --- a/src/vs/workbench/contrib/notebook/browser/media/notebook.css +++ b/src/vs/workbench/contrib/notebook/browser/media/notebook.css @@ -708,7 +708,7 @@ z-index: 28; /* over the focus outline on the editor, below the title toolbar */ width: calc(100% - 32px); opacity: 0; - transition: opacity 0.2s ease-in-out; + transition: opacity 0.3s ease-in-out; padding: 0; margin: 0 16px 0 16px; } @@ -717,11 +717,16 @@ display: none; } -.monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container:focus-within, +/* .monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container:focus-within, .monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container:hover, .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover .cell-bottom-toolbar-container, .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .markdown-cell-hover .cell-bottom-toolbar-container, .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list:focus-within > .monaco-scrollable-element > .monaco-list-rows:not(:hover) > .monaco-list-row.focused .cell-bottom-toolbar-container, +.monaco-workbench .notebookOverlay.notebook-editor-editable > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container:focus-within { + opacity: 1; +} */ + +.monaco-workbench .notebookOverlay.notebook-editor-editable > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container:hover, .monaco-workbench .notebookOverlay.notebook-editor-editable > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container:focus-within { opacity: 1; } diff --git a/src/vs/workbench/contrib/notebook/common/notebookOptions.ts b/src/vs/workbench/contrib/notebook/common/notebookOptions.ts index 7e169f81b1d..0cf5bb1f833 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookOptions.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookOptions.ts @@ -343,17 +343,17 @@ export class NotebookOptions { if (insertToolbarAlignment === 'left' || cellToolbar !== 'hidden') { return { bottomToolbarGap: 18, - bottomToolbarHeight: 22 + bottomToolbarHeight: 18 }; } if (insertToolbarPosition === 'betweenCells' || insertToolbarPosition === 'both') { return compactView ? { bottomToolbarGap: 12, - bottomToolbarHeight: 22 + bottomToolbarHeight: 18 } : { bottomToolbarGap: 18, - bottomToolbarHeight: 22 + bottomToolbarHeight: 18 }; } else { return {