Improving profiler controls and toolbar (#1931)

* Profiler toolbar improvements

* Fixing formatting issues
This commit is contained in:
Madeline MacDonald
2018-07-16 11:44:14 -07:00
committed by GitHub
parent 4d67eca8bb
commit 7b23ca8ee7
4 changed files with 53 additions and 9 deletions

View File

@@ -116,6 +116,7 @@ export class ProfilerEditor extends BaseEditor {
private _viewTemplateSelector: SelectBox;
private _viewTemplates: Array<IProfilerViewTemplate>;
private _connectionInfoText: HTMLElement;
// Actions
private _connectAction: Actions.ProfilerConnect;
@@ -199,8 +200,16 @@ export class ProfilerEditor extends BaseEditor {
}));
let dropdownContainer = document.createElement('div');
dropdownContainer.style.width = '150px';
dropdownContainer.style.paddingRight = '5px';
this._viewTemplateSelector.render(dropdownContainer);
this._connectionInfoText = document.createElement('div');
this._connectionInfoText.style.paddingRight = '5px';
this._connectionInfoText.innerText = '';
this._connectionInfoText.style.textAlign = 'center';
this._connectionInfoText.style.display = 'flex';
this._connectionInfoText.style.alignItems = 'center';
this._register(attachSelectBoxStyler(this._viewTemplateSelector, this.themeService));
this._actionBar.setContent([
@@ -211,6 +220,8 @@ export class ProfilerEditor extends BaseEditor {
{ action: this._autoscrollAction },
{ action: this._instantiationService.createInstance(Actions.ProfilerClear, Actions.ProfilerClear.ID, Actions.ProfilerClear.LABEL) },
{ element: dropdownContainer },
{ element: Taskbar.createTaskbarSeparator() },
{ element: this._connectionInfoText }
]);
}
@@ -361,6 +372,7 @@ export class ProfilerEditor extends BaseEditor {
autoscroll: true,
isPanelCollapsed: true
});
this._connectionInfoText.innerText = input.connectionName;
this._profilerTableEditor.updateState();
this._splitView.layout();
this._profilerTableEditor.focus();