Change server group look (#13608)

* change server group look

* remove dead code

* add top padding

* add bot padding as well

* fix heights to account for padding

* fix arrow alignment

* fix ellipses and node length parity

* fix alignment
This commit is contained in:
Aditya Bist
2020-12-09 10:54:47 -08:00
committed by GitHub
parent 15b8fa72ec
commit 91522caa67
2 changed files with 24 additions and 18 deletions

View File

@@ -45,7 +45,7 @@ export interface IObjectExplorerTemplateData {
export class ServerTreeRenderer implements IRenderer {
public static CONNECTION_HEIGHT = 23;
public static CONNECTION_GROUP_HEIGHT = 38;
public static CONNECTION_GROUP_HEIGHT = 33;
public static CONNECTION_TEMPLATE_ID = 'connectionProfile';
public static CONNECTION_GROUP_TEMPLATE_ID = 'connectionProfileGroup';
public static OBJECTEXPLORER_HEIGHT = 23;
@@ -231,14 +231,13 @@ export class ServerTreeRenderer implements IRenderer {
}
private renderConnectionProfileGroup(connectionProfileGroup: ConnectionProfileGroup, templateData: IConnectionProfileGroupTemplateData): void {
let rowElement = this.findParentElement(templateData.root, 'monaco-tree-row');
if (rowElement) {
let groupElement = this.findParentElement(templateData.root, 'server-group');
if (groupElement) {
if (connectionProfileGroup.color) {
rowElement.style.background = connectionProfileGroup.color;
groupElement.style.background = connectionProfileGroup.color;
} else {
// If the group doesn't contain specific color, assign the default color
rowElement.style.background = DefaultServerGroupColor;
groupElement.style.background = DefaultServerGroupColor;
}
}
if (connectionProfileGroup.description && (connectionProfileGroup.description !== '')) {