mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 09:35:37 -05:00
make the tree theme aware and remove group color (#13143)
* make the tree theme aware and remove group color * fix eslint error
This commit is contained in:
@@ -134,7 +134,7 @@ export class ConnectionBrowserView extends Disposable implements IPanelView {
|
||||
new ProviderElementRenderer(),
|
||||
this.instantiationService.createInstance(TreeItemRenderer, this.treeLabels),
|
||||
this.instantiationService.createInstance(ConnectionProfileRenderer, true),
|
||||
this.instantiationService.createInstance(ConnectionProfileGroupRenderer),
|
||||
this.instantiationService.createInstance(ConnectionProfileGroupRenderer, { showColor: false }),
|
||||
this.instantiationService.createInstance(TreeNodeRenderer),
|
||||
new SavedConnectionsNodeRenderer()
|
||||
];
|
||||
@@ -215,6 +215,10 @@ export class ConnectionBrowserView extends Disposable implements IPanelView {
|
||||
this._register(this.capabilitiesService.onCapabilitiesRegistered(() => {
|
||||
this.updateSavedConnectionsNode();
|
||||
}));
|
||||
|
||||
this._register(this.themeService.onDidColorThemeChange(async () => {
|
||||
await this.refresh();
|
||||
}));
|
||||
}
|
||||
|
||||
private updateSavedConnectionsNode(): void {
|
||||
@@ -411,7 +415,7 @@ class DataSource implements IAsyncDataSource<TreeModel, TreeElement> {
|
||||
} else if (element instanceof ConnectionProfile) {
|
||||
return false;
|
||||
} else if (element instanceof ConnectionProfileGroup) {
|
||||
return element.hasChildren();
|
||||
return true;
|
||||
} else if (element instanceof TreeNode) {
|
||||
return element.children.length > 0;
|
||||
} else if (element instanceof SavedConnectionNode) {
|
||||
|
||||
Reference in New Issue
Block a user