Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align the directory icons. #173

Closed
wants to merge 1 commit into from
Closed

Align the directory icons. #173

wants to merge 1 commit into from

Conversation

seagle0128
Copy link
Contributor

@seagle0128 seagle0128 commented Nov 22, 2019

Align the directory icons.

Before:
image

After:
image

@wyuenho
Copy link
Collaborator

wyuenho commented Nov 26, 2019

Why?

@seagle0128
Copy link
Contributor Author

As the screenshots above, the directory icons are not aligned in center with the text, especailly for .git and .vscode folders.

@wyuenho
Copy link
Collaborator

wyuenho commented Nov 27, 2019

The icons are not aligned because of glyph differences, why would left aligning them make any difference?

@seagle0128
Copy link
Contributor Author

If the folder list is long, the directory icons and the text will be not aligned, which cause the bad UX. Adding :v-adjust for alignment, is like in other icons. e.g.

("\\.tags" all-the-icons-octicon "tag" :height 1.0 :v-adjust 0.0 :face all-the-icons-blue)

@wyuenho
Copy link
Collaborator

wyuenho commented Nov 28, 2019

Ah I see what you are trying to do, you are trying to tighten the gap between top and bottom. However, I see the top of the git icon has been clipped. Maybe try playing around with the height a little bit?

@seagle0128
Copy link
Contributor Author

No. It couldn't address the issue in my testing. And the bigger height makes the icon bigger than others. Do you have other solution?

@seagle0128
Copy link
Contributor Author

Hi, if you still have some concerns, how about add an optional argument v-adjust to all-the-icons-icon-for-dir?

@wyuenho
Copy link
Collaborator

wyuenho commented Dec 5, 2019

Have you tried setting the height from 1.1 back to 1.0?

@seagle0128
Copy link
Contributor Author

seagle0128 commented Dec 5, 2019

Sure. The icon looks smaller than others, and is still not aligned vertically after setting to 1.0.

BTW, the most of directory icons are not aligned vertically if you look at carefully.

@wyuenho
Copy link
Collaborator

wyuenho commented Dec 8, 2019

BTW, the most of directory icons are not aligned vertically if you look at carefully.

That's the problem of mixing multiple fonts of different sizes into one icon font. It's an inherent problem of this package. I think it's futile to individually adjust all of them, there are dozens of tickets in this package that is the result of this technical choice. The ideal solution is to take the SVG sources of these icons, resize all of them, and then replace the icon fonts with these SVG icons. I've been experimenting with this and see how much of a performance impact it will have.

Meanwhile, if you want you can keep playing with the text properties until they are perfectly aligned. I'm reluctant to accept any PRs that is not straightly an improvement.

@seagle0128
Copy link
Contributor Author

Close it due to #181.

@seagle0128 seagle0128 closed this Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants