Fix #3985 Hide cell toolbar for markdown cells (#3987)

* Fix #3985 Hide cell toolbar for markdown cells
* Note that I'm still hiding the overall toolbar section per UX feedback
* Also now hiding line numbers per UX feedback..
This commit is contained in:
Kevin Cunnane
2019-02-08 16:38:28 -08:00
committed by GitHub
parent 7dd32ed44b
commit b964dd0895
5 changed files with 35 additions and 6 deletions

View File

@@ -37,6 +37,7 @@ export class QueryTextEditor extends BaseTextEditor {
private _config: editorCommon.IConfiguration;
private _minHeight: number;
private _selected: boolean;
private _hideLineNumbers: boolean;
private _editorWorkspaceConfig;
private _scrollbarHeight: number;
constructor(
@@ -78,6 +79,9 @@ export class QueryTextEditor extends BaseTextEditor {
if (!this._selected) {
options.renderLineHighlight = 'none';
}
if (this._hideLineNumbers) {
options.lineNumbers = 'off';
}
}
return options;
}
@@ -169,6 +173,11 @@ export class QueryTextEditor extends BaseTextEditor {
this.refreshEditorConfguration();
}
public set hideLineNumbers(value: boolean) {
this._hideLineNumbers = value;
this.refreshEditorConfguration();
}
private refreshEditorConfguration(configuration = this.configurationService.getValue<IEditorConfiguration>(this.getResource())): void {
if (!this.getControl()) {
return;