emacs-neotree icon indicating copy to clipboard operation
emacs-neotree copied to clipboard

Expanded folder is indented when using "icons" theme

Open jimeh opened this issue 6 years ago • 1 comments

This isn't that important, but still probably not the desired behavior, hence I'm reporting it.

When using the icons theme and expand a folder, the expanded folder gets "half-indented", which makes it look a bit out of place and almost as if it's within the folder showing directly above it.

With the games folder collapsed:

screen shot 2017-12-15 at 11 48 51

And the games folder expanded:

screen shot 2017-12-15 at 11 49 03

jimeh avatar Dec 15 '17 11:12 jimeh

This seems to be an issue with the width of the "down arrow" icon! In the function neo-buffer--insert-fold-symbol the code to draw the down arrow is: (insert (all-the-icons-icon-for-dir (directory-file-name node-name) "down"))). If I change "down" to "left" then the spacing is correct:

Screenshot from 2019-05-31 06-52-41

It looks like the "left" and "right" icons are skinnier than the "up" and "down" icons.

[Edit: looks like a general "problem" with all-the-icons - https://github.com/domtronn/all-the-icons.el/issues/33]

[Edit 2: looking at the all-the-icons-icon-for-dir function, it takes another parameter "padding" that defaults to "\t". Changing that to a " " makes things look better for me (as well as changin the final \t to " " in the leaf format too). The tabs tend to push things out by a lot rather than a little

      (or (and (equal name 'open)  (insert (all-the-icons-icon-for-dir (directory-file-name node-name) "left" " ")))
          (and (equal name 'close) (insert (all-the-icons-icon-for-dir (directory-file-name node-name) "right" " ")))
          (and (equal name 'leaf)  (insert (format "\t\t\t%s " (all-the-icons-icon-for-file node-name))))))

]

mrspeaker avatar May 31 '19 10:05 mrspeaker