all-the-icons-ivy icon indicating copy to clipboard operation
all-the-icons-ivy copied to clipboard

Inconsistent spacing

Open Sbozzolo opened this issue 5 years ago • 15 comments

Hi,

there are some (minor) problems with all-the-icons-ivy on my machine.

Some entries are not iconified, and it is seems that this breaks the formatting, as you can see in the following screenshot.

2019-03-04 08 37 23

Maybe this could be solved by having a generic icon for everything which has no specific icon.

Moreover, it also seems that the height of each entry is inconsistent. This is especially clear when you look at the highlighted region, which varies in height depending on the icon. For instance, in the previous screenshot, the white space is not balanced in the selected entry.

(I am aware that these are very fine details, and maybe they bother only me.)

Thanks, sbozzolo

Sbozzolo avatar Mar 04 '19 15:03 Sbozzolo

Maybe this could be solved by having a generic icon for everything which has no specific icon.

I haven't though about it, but yes that sounds good.

Moreover, it also seems that the height of each entry is inconsistent. This is especially clear when you look at the highlighted region, which varies in height depending on the icon. For instance, in the previous screenshot, the white space is not balanced in the selected entry.

That might be more related to your theme. This is how it looks for me: Screen Shot 2019-04-16 at 23 38 21

The theme I'm using is doom-spacegray.

asok avatar Apr 16 '19 21:04 asok

I see that I also have a spacing issue "all-the-icons-ivy.el" is taking more height than for example "scratch"...

asok avatar Apr 20 '19 08:04 asok

@Sbozzolo I've just pushed a commit that adds an icon it seems that it helped.

asok avatar Apr 20 '19 15:04 asok

Thanks!

I tested the new commit. It works better, but I still have inconsistent icon size. See, e.g., image attached. I took two screenshots selecting two different entries and aligned them. The size of the highlighted region is not the same.

2019-04-25:20:19:23

(I understand 100% that this is very picky)

Sbozzolo avatar Apr 26 '19 03:04 Sbozzolo

@Sbozzolo I appreciate you're attention to details. I've made a change in the last push. Please have a look. I hope it won't trigger unwanted side effects.

asok avatar May 04 '19 10:05 asok

I changed the theme and the new one has a subtle highlighter, so it is harder to tell. However, if I focus I can see some small inconsistent behaviors. For instance in the centering of the icon with respect to the height text.

Sbozzolo avatar May 08 '19 03:05 Sbozzolo

Oh boy I think that's too much of fine tuning for me. I will leave this issue open. I will revert my last change and put it in a separate branch, so if someone wants could potentially continue the work there.

asok avatar May 08 '19 18:05 asok

The branch is this one: https://github.com/asok/all-the-icons-ivy/tree/overwrite-args

asok avatar May 08 '19 18:05 asok

Thanks for your efforts!

Adam Sokolnicki writes:

The branch is this one: https://github.com/asok/all-the-icons-ivy/tree/overwrite-args

Sbozzolo avatar May 08 '19 18:05 Sbozzolo

I just want to check on the status of this issue, if anyone has worked on it since this discussion? Here's a current screenshot of what I'm seeing: 2020-11-06-104223_975x428_scrot Where at least the Rust icon clearly causes taller rows than the rest.

loafofpiecrust avatar Nov 06 '20 15:11 loafofpiecrust

@loafofpiecrust if you download this file and evaluate the buffer https://github.com/asok/all-the-icons-ivy/blob/overwrite-args/all-the-icons-ivy.el does it help?

asok avatar Nov 06 '20 16:11 asok

@asok Using that branch does help, but it isn't a complete solution.

2020-11-06-124842_1058x395_scrot As you can see, the rust icon is still aligned weirdly within the row but the height is much better. I'm not sure how easily you can tell, but the height still varies between the .rs, .js and .json rows by a few pixels.

loafofpiecrust avatar Nov 06 '20 17:11 loafofpiecrust

@loafofpiecrust does it help if you do (setq all-the-icons-ivy-icon-args (list :height 1.0 :v-adjust 0.1))? You can play with :v-adjust variable and see if it helps.

asok avatar Nov 18 '20 22:11 asok

@asok That seems to help a bit, at least for the Rust icon, but since that adjusts all icon positions it's not a fix. The problem is that the icons are positioned and sized differently from each other. Could this have to do with inconsistency within the font itself?

loafofpiecrust avatar Nov 19 '20 15:11 loafofpiecrust

Could this have to do with inconsistency within the font itself?

I believe so. If you look here you can see that the icon for rust is defined as 1.2 height. I do know why it is so. Maybe it makes sense adjust the icons if they are to be displayed horizontally. But clearly for ivy candidates this creates the weird spacing.

help a bit, at least for the Rust icon, but since that adjusts all icon positions it's not a fix

That is the reason why I have not merged in that branch. I'm not sure if I don't break stuff.

asok avatar Nov 28 '20 18:11 asok