Fix some cell UI issues (toolbar background color, unselected cells) (#3881)

- Toolbar background is now differentiated from the editor
- For unselected cells there's no longer a line selection in the cell. This makes it clearer what the active cell is (and cleans the UI up)
This commit is contained in:
Kevin Cunnane
2019-02-01 08:03:23 -08:00
committed by GitHub
parent 60b2b92803
commit afb6e6b5ba
4 changed files with 33 additions and 9 deletions

View File

@@ -93,11 +93,10 @@ export class CodeComponent extends AngularDisposable implements OnInit, OnChange
for (let propName in changes) {
if (propName === 'activeCellId') {
let changedProp = changes[propName];
if (this.cellModel.id === changedProp.currentValue) {
this._cellToggleMoreActions.toggle(true, this.moreActionsElementRef, this.model, this.cellModel);
}
else {
this._cellToggleMoreActions.toggle(false, this.moreActionsElementRef, this.model, this.cellModel);
let isActive = this.cellModel.id === changedProp.currentValue;
this._cellToggleMoreActions.toggle(isActive, this.moreActionsElementRef, this.model, this.cellModel);
if (this._editor) {
this._editor.toggleEditorSelected(isActive);
}
break;
}
@@ -133,6 +132,8 @@ export class CodeComponent extends AngularDisposable implements OnInit, OnChange
this._editorModel = model.textEditorModel;
this._modelService.updateModel(this._editorModel, this.cellModel.source);
});
let isActive = this.cellModel.id === this._activeCellId;
this._editor.toggleEditorSelected(isActive);
this._register(this._editor);
this._register(this._editorInput);