Skip to content

Commit 635c2f2

Browse files
committed
toolbar height
1 parent 5798020 commit 635c2f2

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { InsertCodeCellAboveAction, INotebookCellActionContext, InsertCodeCellBe
2222
import { CellRenderTemplate, INotebookEditor, ICellViewModel } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
2323
import { CodeCell } from 'vs/workbench/contrib/notebook/browser/view/renderers/codeCell';
2424
import { StatefullMarkdownCell } from 'vs/workbench/contrib/notebook/browser/view/renderers/markdownCell';
25-
import { CellKind, EDITOR_BOTTOM_PADDING, EDITOR_TOP_PADDING } from 'vs/workbench/contrib/notebook/common/notebookCommon';
25+
import { CellKind, EDITOR_BOTTOM_PADDING, EDITOR_TOP_PADDING, EDITOR_TOOLBAR_HEIGHT } from 'vs/workbench/contrib/notebook/common/notebookCommon';
2626
import { CellViewModel } from '../../viewModel/notebookCellViewModel';
2727
import { ContextAwareMenuEntryActionViewItem } from 'vs/platform/actions/browser/menuEntryActionViewItem';
2828
import { MenuItemAction } from 'vs/platform/actions/common/actions';
@@ -31,7 +31,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
3131

3232
export class NotebookCellListDelegate implements IListVirtualDelegate<ICellViewModel> {
3333
private _lineHeight: number;
34-
private _toolbarHeight = 22;
34+
private _toolbarHeight = EDITOR_TOOLBAR_HEIGHT;
3535

3636
constructor(
3737
@IConfigurationService private readonly configurationService: IConfigurationService

src/vs/workbench/contrib/notebook/browser/viewModel/notebookCellViewModel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService';
1515
import { PrefixSumComputer } from 'vs/editor/common/viewModel/prefixSumComputer';
1616
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
1717
import { MarkdownRenderer } from 'vs/workbench/contrib/notebook/browser/view/renderers/mdRenderer';
18-
import { CellKind, EDITOR_BOTTOM_PADDING, EDITOR_TOP_PADDING, ICell, IOutput, NotebookCellOutputsSplice } from 'vs/workbench/contrib/notebook/common/notebookCommon';
18+
import { CellKind, EDITOR_BOTTOM_PADDING, EDITOR_TOP_PADDING, ICell, IOutput, NotebookCellOutputsSplice, EDITOR_TOOLBAR_HEIGHT } from 'vs/workbench/contrib/notebook/common/notebookCommon';
1919
import { CellFindMatch, CellState, CursorAtBoundary, CellFocusMode, ICellViewModel } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
2020

2121
export class CellViewModel extends Disposable implements ICellViewModel {
@@ -481,9 +481,9 @@ export class CellViewModel extends Disposable implements ICellViewModel {
481481

482482
getCellTotalHeight(): number {
483483
if (this.outputs.length) {
484-
return this.editorHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING + 16 + this.getOutputTotalHeight();
484+
return EDITOR_TOOLBAR_HEIGHT + this.editorHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING + 16 + this.getOutputTotalHeight();
485485
} else {
486-
return this.editorHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING + this.getOutputTotalHeight();
486+
return EDITOR_TOOLBAR_HEIGHT + this.editorHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING + this.getOutputTotalHeight();
487487
}
488488
}
489489

src/vs/workbench/contrib/notebook/common/notebookCommon.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ export const CELL_MARGIN = 24;
158158

159159
export const EDITOR_TOP_PADDING = 8;
160160
export const EDITOR_BOTTOM_PADDING = 8;
161+
export const EDITOR_TOOLBAR_HEIGHT = 22;
161162

162163

163164
export type NotebookCellsSplice = [

0 commit comments

Comments
 (0)