提交 1a16b307 编写于 作者: R rebornix

update nb diff editor options.

上级 bd4e3c30
......@@ -20,8 +20,7 @@ import { applyEdits } from 'vs/base/common/jsonEdit';
import { NotebookCellMetadata } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { hash } from 'vs/base/common/hash';
const fixedDiffEditorOptions: IDiffEditorOptions = {
const fixedEditorOptions: IEditorOptions = {
padding: {
top: 12,
bottom: 12
......@@ -41,41 +40,22 @@ const fixedDiffEditorOptions: IDiffEditorOptions = {
wordWrap: 'off',
lineNumbers: 'off',
lineDecorationsWidth: 0,
glyphMargin: true,
glyphMargin: false,
fixedOverflowWidgets: true,
minimap: { enabled: false },
renderValidationDecorations: 'on',
renderLineHighlight: 'none',
readOnly: true
};
const fixedDiffEditorOptions: IDiffEditorOptions = {
...fixedEditorOptions,
glyphMargin: true,
enableSplitViewResizing: false,
renderIndicators: false,
renderLineHighlight: 'none'
};
const fixedEditorOptions: IEditorOptions = {
padding: {
top: 12,
bottom: 12
},
scrollBeyondLastLine: false,
scrollbar: {
verticalScrollbarSize: 14,
horizontal: 'auto',
useShadows: true,
verticalHasArrows: false,
horizontalHasArrows: false,
alwaysConsumeMouseWheel: false
},
renderLineHighlightOnlyWhenFocus: true,
overviewRulerLanes: 0,
selectOnLineNumbers: false,
wordWrap: 'off',
lineNumbers: 'off',
lineDecorationsWidth: 0,
glyphMargin: false,
fixedOverflowWidgets: true,
minimap: { enabled: false },
renderValidationDecorations: 'on',
renderLineHighlight: 'none'
};
class PropertyHeader extends Disposable {
protected _foldingIndicator!: HTMLElement;
......@@ -111,6 +91,7 @@ class PropertyHeader extends Disposable {
if (metadataChanged) {
this._statusSpan.textContent = this.accessor.changedLabel;
this._statusSpan.style.fontWeight = 'bold';
DOM.addClass(this.metadataHeaderContainer, 'modified');
} else {
this._statusSpan.textContent = this.accessor.unChangedLabel;
}
......
......@@ -390,6 +390,15 @@ registerThemingParticipant((theme, collector) => {
);
}
// const changed = theme.getColor(editorGutterModifiedBackground);
// if (changed) {
// collector.addRule(`
// .notebook-text-diff-editor .cell-diff-editor-container .metadata-header-container.modified {
// background-color: ${changed};
// }
// `);
// }
collector.addRule(`.notebook-text-diff-editor .cell-body { margin: ${DIFF_CELL_MARGIN}px; }`);
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册