Skip to content

Commit

Permalink
workspace: fix path alignment in dialogs
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: shuyaqian <[email protected]>
  • Loading branch information
vince-fugnitto and shuyaqian committed Mar 3, 2022
1 parent 41a2f5b commit 1fbb7fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/workspace/src/browser/workspace-input-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 1fbb7fe

Please sign in to comment.