mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
fix #128999.
This commit is contained in:
parent
c69945154d
commit
dd33bf7dd6
|
@ -276,7 +276,7 @@ export class InteractiveEditor extends EditorPane {
|
|||
} = this.#notebookOptions.getLayoutConfiguration();
|
||||
const leftMargin = codeCellLeftMargin + cellRunGutter;
|
||||
const maxHeight = Math.min(this.#dimension.height / 2, this._inputCellEditorHeight);
|
||||
this.#codeEditorWidget.layout(new DOM.Dimension(this.#dimension.width - leftMargin - INPUT_CELL_HORIZONTAL_PADDING_RIGHT, maxHeight));
|
||||
this.#codeEditorWidget.layout(this.#validateDimension(this.#dimension.width - leftMargin - INPUT_CELL_HORIZONTAL_PADDING_RIGHT, maxHeight));
|
||||
this.#inputFocusIndicator.style.height = `${this._inputCellEditorHeight}px`;
|
||||
this.#inputCellContainer.style.top = `${this.#dimension.height - this._inputCellContainerHeight}px`;
|
||||
this.#inputCellContainer.style.width = `${this.#dimension.width}px`;
|
||||
|
@ -508,12 +508,16 @@ export class InteractiveEditor extends EditorPane {
|
|||
this.#notebookEditorContainer.style.height = `${dimension.height - inputCellContainerHeight}px`;
|
||||
|
||||
this.#notebookWidget.value!.layout(dimension.with(dimension.width, dimension.height - inputCellContainerHeight), this.#notebookEditorContainer);
|
||||
this.#codeEditorWidget.layout(new DOM.Dimension(dimension.width - leftMargin - INPUT_CELL_HORIZONTAL_PADDING_RIGHT, maxHeight));
|
||||
this.#codeEditorWidget.layout(this.#validateDimension(dimension.width - leftMargin - INPUT_CELL_HORIZONTAL_PADDING_RIGHT, maxHeight));
|
||||
this.#inputFocusIndicator.style.height = `${contentHeight}px`;
|
||||
this.#inputCellContainer.style.top = `${dimension.height - inputCellContainerHeight}px`;
|
||||
this.#inputCellContainer.style.width = `${dimension.width}px`;
|
||||
}
|
||||
|
||||
#validateDimension(width: number, height: number) {
|
||||
return new DOM.Dimension(Math.max(0, width), Math.max(0, height));
|
||||
}
|
||||
|
||||
#updateInputDecoration(): void {
|
||||
if (!this.#codeEditorWidget) {
|
||||
return;
|
||||
|
|
|
@ -196,6 +196,11 @@ export class NotebookEditorToolbar extends Disposable {
|
|||
}
|
||||
|
||||
layout() {
|
||||
if (!this._useGlobalToolbar) {
|
||||
this.domNode.style.display = 'none';
|
||||
} else {
|
||||
this.domNode.style.display = 'flex';
|
||||
}
|
||||
this._updateScrollbar();
|
||||
}
|
||||
|
||||
|
|
|
@ -1540,6 +1540,11 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
|
|||
return;
|
||||
}
|
||||
|
||||
if (dimension.width <= 0 || dimension.height <= 0) {
|
||||
this.onWillHide();
|
||||
return;
|
||||
}
|
||||
|
||||
if (shadowElement) {
|
||||
const containerRect = shadowElement.getBoundingClientRect();
|
||||
|
||||
|
@ -1617,6 +1622,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
|
|||
this._editorFocus.set(false);
|
||||
this._overlayContainer.style.visibility = 'hidden';
|
||||
this._overlayContainer.style.left = '-50000px';
|
||||
this._notebookTopToolbarContainer.style.display = 'none';
|
||||
}
|
||||
|
||||
updateEditorFocus() {
|
||||
|
|
Loading…
Reference in a new issue