From 1fbb7fe4bca4d1a653c0bc32719f38d9f537ff56 Mon Sep 17 00:00:00 2001 From: vince-fugnitto Date: Mon, 28 Feb 2022 12:26:45 -0500 Subject: [PATCH] workspace: fix path alignment in dialogs The commit fixes the alignment when displaying the path in the workspace input dialog (ex: new file, new folder). The path is now correctly aligned with the icon. The change also includes the full path to the folder when hovering over the label (useful for multi-root workspaces especially). Signed-off-by: vince-fugnitto Co-authored-by: shuyaqian <717749594@qq.com> --- packages/workspace/src/browser/workspace-input-dialog.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/workspace/src/browser/workspace-input-dialog.ts b/packages/workspace/src/browser/workspace-input-dialog.ts index 9f42ef9ce6b78..d3fe50e39fc2f 100644 --- a/packages/workspace/src/browser/workspace-input-dialog.ts +++ b/packages/workspace/src/browser/workspace-input-dialog.ts @@ -49,6 +49,9 @@ export class WorkspaceInputDialog extends SingleTextInputDialog { const icon = document.createElement('i'); icon.classList.add(...codiconArray('folder')); icon.style.marginRight = '0.5em'; + icon.style.verticalAlign = 'middle'; + element.style.verticalAlign = 'middle'; + element.title = this.props.parentUri.path.toString(); element.appendChild(icon); element.appendChild(document.createTextNode(label)); // Add the path and icon div before the `inputField`.