mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-26 01:38:40 +01:00
@@ -30,7 +30,7 @@ import { NotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookEd
|
||||
import { NotebookEditorInput } from 'vs/workbench/contrib/notebook/browser/notebookEditorInput';
|
||||
import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService';
|
||||
import { NotebookService } from 'vs/workbench/contrib/notebook/browser/notebookServiceImpl';
|
||||
import { CellKind, CellToolbarLocKey, CellUri, DisplayOrderKey, getCellUndoRedoComparisonKey, NotebookDocumentBackupData, NotebookEditorPriority, NotebookTextDiffEditorPreview, ShowCellStatusbarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { CellKind, CellToolbarLocKey, CellUri, DisplayOrderKey, getCellUndoRedoComparisonKey, NotebookDocumentBackupData, NotebookEditorPriority, NotebookTextDiffEditorPreview, ShowCellStatusBarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { NotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookProvider';
|
||||
import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { IEditorService, IOpenEditorOverride } from 'vs/workbench/services/editor/common/editorService';
|
||||
@@ -580,7 +580,7 @@ configurationRegistry.registerConfiguration({
|
||||
enum: ['left', 'right', 'hidden'],
|
||||
default: 'right'
|
||||
},
|
||||
[ShowCellStatusbarKey]: {
|
||||
[ShowCellStatusBarKey]: {
|
||||
description: nls.localize('notebook.showCellStatusbar.description', "Whether the cell statusbar should be shown."),
|
||||
type: 'boolean',
|
||||
default: true
|
||||
|
||||
@@ -52,7 +52,7 @@ import { CodeCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewMod
|
||||
import { NotebookEventDispatcher, NotebookLayoutChangedEvent } from 'vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher';
|
||||
import { CellViewModel, IModelDecorationsChangeAccessor, INotebookEditorViewState, NotebookViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel';
|
||||
import { NotebookTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookTextModel';
|
||||
import { CellKind, CellToolbarLocKey, ICellRange, IInsetRenderOutput, INotebookKernelInfo2, IProcessedOutput, isTransformedDisplayOutput, NotebookCellRunState, NotebookRunState, ShowCellStatusbarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { CellKind, CellToolbarLocKey, ICellRange, IInsetRenderOutput, INotebookKernelInfo2, IProcessedOutput, isTransformedDisplayOutput, NotebookCellRunState, NotebookRunState, ShowCellStatusBarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { NotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookProvider';
|
||||
import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService';
|
||||
import { editorGutterModifiedBackground } from 'vs/workbench/contrib/scm/browser/dirtydiffDecorator';
|
||||
@@ -251,7 +251,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
|
||||
}
|
||||
}
|
||||
|
||||
if (e.affectsConfiguration(CellToolbarLocKey) || e.affectsConfiguration(ShowCellStatusbarKey)) {
|
||||
if (e.affectsConfiguration(CellToolbarLocKey) || e.affectsConfiguration(ShowCellStatusBarKey)) {
|
||||
this._updateForNotebookConfiguration();
|
||||
}
|
||||
});
|
||||
@@ -306,7 +306,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
|
||||
this._overlayContainer.classList.add(`cell-title-toolbar-${cellToolbarLocation}`);
|
||||
}
|
||||
|
||||
const showCellStatusBar = this.configurationService.getValue<boolean>(ShowCellStatusbarKey);
|
||||
const showCellStatusBar = this.configurationService.getValue<boolean>(ShowCellStatusBarKey);
|
||||
this._overlayContainer.classList.toggle('cell-statusbar-hidden', !showCellStatusBar);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ import { StatefulMarkdownCell } from 'vs/workbench/contrib/notebook/browser/view
|
||||
import { CodeCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel';
|
||||
import { MarkdownCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel';
|
||||
import { CellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel';
|
||||
import { CellKind, NotebookCellMetadata, NotebookCellRunState, ShowCellStatusbarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { CellKind, NotebookCellMetadata, NotebookCellRunState, ShowCellStatusBarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { createAndFillInActionBarActionsWithVerticalSeparators, VerticalSeparator, VerticalSeparatorViewItem } from './cellActionView';
|
||||
|
||||
const $ = DOM.$;
|
||||
@@ -112,14 +112,14 @@ export class CellEditorOptions {
|
||||
constructor(configurationService: IConfigurationService, language: string) {
|
||||
|
||||
this.disposable = configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration('editor') || e.affectsConfiguration(ShowCellStatusbarKey)) {
|
||||
if (e.affectsConfiguration('editor') || e.affectsConfiguration(ShowCellStatusBarKey)) {
|
||||
this._value = computeEditorOptions();
|
||||
this._onDidChange.fire(this.value);
|
||||
}
|
||||
});
|
||||
|
||||
const computeEditorOptions = () => {
|
||||
const showCellStatusBar = configurationService.getValue<boolean>(ShowCellStatusbarKey);
|
||||
const showCellStatusBar = configurationService.getValue<boolean>(ShowCellStatusBarKey);
|
||||
const editorPadding = {
|
||||
top: EDITOR_TOP_PADDING,
|
||||
bottom: showCellStatusBar ? EDITOR_BOTTOM_PADDING : EDITOR_BOTTOM_PADDING_WITHOUT_STATUSBAR
|
||||
|
||||
@@ -14,7 +14,7 @@ import * as model from 'vs/editor/common/model';
|
||||
import { SearchParams } from 'vs/editor/common/model/textModelSearch';
|
||||
import { CELL_STATUSBAR_HEIGHT, EDITOR_TOP_PADDING } from 'vs/workbench/contrib/notebook/browser/constants';
|
||||
import { CellEditState, CellFocusMode, CursorAtBoundary, CellViewModelStateChangeEvent, IEditableCellViewModel, INotebookCellDecorationOptions } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
|
||||
import { CellKind, NotebookCellMetadata, NotebookDocumentMetadata, INotebookSearchOptions, ShowCellStatusbarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { CellKind, NotebookCellMetadata, NotebookDocumentMetadata, INotebookSearchOptions, ShowCellStatusBarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { NotebookCellTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookCellTextModel';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
@@ -125,14 +125,14 @@ export abstract class BaseCellViewModel extends Disposable {
|
||||
}));
|
||||
|
||||
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration(ShowCellStatusbarKey)) {
|
||||
if (e.affectsConfiguration(ShowCellStatusBarKey)) {
|
||||
this.layoutChange({});
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
protected getEditorStatusbarHeight() {
|
||||
const showCellStatusBar = this._configurationService.getValue<boolean>(ShowCellStatusbarKey);
|
||||
const showCellStatusBar = this._configurationService.getValue<boolean>(ShowCellStatusBarKey);
|
||||
return showCellStatusBar ? CELL_STATUSBAR_HEIGHT : 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -817,7 +817,7 @@ export interface INotebookCellStatusBarEntry {
|
||||
|
||||
export const DisplayOrderKey = 'notebook.displayOrder';
|
||||
export const CellToolbarLocKey = 'notebook.cellToolbarLocation';
|
||||
export const ShowCellStatusbarKey = 'notebook.showCellStatusbar';
|
||||
export const ShowCellStatusBarKey = 'notebook.showCellStatusBar';
|
||||
export const NotebookTextDiffEditorPreview = 'notebook.diff.enablePreview';
|
||||
|
||||
export const enum CellStatusbarAlignment {
|
||||
|
||||
Reference in New Issue
Block a user