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

Misaligned icons with all-the-icons #139

Open
pedro-augusto-santana opened this issue Nov 3, 2020 · 1 comment
Open

Misaligned icons with all-the-icons #139

pedro-augusto-santana opened this issue Nov 3, 2020 · 1 comment

Comments

@pedro-augusto-santana
Copy link

pedro-augusto-santana commented Nov 3, 2020

When I activate "all-the-icons" for company box, the icons get misaligned
(setq company-box-icons-alist 'company-box-icons-all-the-icons)
Expected behavior :
image
With all-the-icons enabled :
image

My font is "Source Code Pro" height 135 if it helps

@KaratasFurkan
Copy link
Contributor

You can fix it by changing vertical-adjust of all icons one by one, or you can change it everywhere with all-the-icons-default-adjust variable. But changing the variable temporarily during calculation of icons is better IMO. So you can use let and re-declare icons. Here is a block you can copy&paste from my old configuration: (note: icons and colors are selected by me, you can change the icon list part with the default that you can copy from company-box-icons.el)

(setq company-box-icons-alist 'company-box-icons-all-the-icons
      company-box-icons-all-the-icons
      (let ((all-the-icons-scale-factor 1)
            (all-the-icons-default-adjust 0))
        `((Unknown       . ,(all-the-icons-faicon "question" :face 'all-the-icons-purple)) ;;question-circle is also good
          (Text          . ,(all-the-icons-faicon "file-text-o" :face 'all-the-icons-green))
          (Method        . ,(all-the-icons-faicon "cube" :face 'all-the-icons-dcyan))
          (Function      . ,(all-the-icons-faicon "cube" :face 'all-the-icons-dcyan))
          (Constructor   . ,(all-the-icons-faicon "cube" :face 'all-the-icons-dcyan))
          (Field         . ,(all-the-icons-faicon "tag" :face 'all-the-icons-red))
          (Variable      . ,(all-the-icons-faicon "tag" :face 'all-the-icons-dpurple))
          (Class         . ,(all-the-icons-faicon "cog" :face 'all-the-icons-red))
          (Interface     . ,(all-the-icons-faicon "cogs" :face 'all-the-icons-red))
          (Module        . ,(all-the-icons-alltheicon "less" :face 'all-the-icons-red))
          (Property      . ,(all-the-icons-faicon "wrench" :face 'all-the-icons-red))
          (Unit          . ,(all-the-icons-faicon "tag" :face 'all-the-icons-red))
          (Value         . ,(all-the-icons-faicon "tag" :face 'all-the-icons-red))
          (Enum          . ,(all-the-icons-faicon "file-text-o" :face 'all-the-icons-red))
          (Keyword       . ,(all-the-icons-material "format_align_center" :face 'all-the-icons-red))
          (Snippet       . ,(all-the-icons-material "content_paste" :face 'all-the-icons-red))
          (Color         . ,(all-the-icons-material "palette" :face 'all-the-icons-red))
          (File          . ,(all-the-icons-faicon "file" :face 'all-the-icons-red))
          (Reference     . ,(all-the-icons-faicon "tag" :face 'all-the-icons-red))
          (Folder        . ,(all-the-icons-faicon "folder" :face 'all-the-icons-red))
          (EnumMember    . ,(all-the-icons-faicon "tag" :face 'all-the-icons-red))
          (Constant      . ,(all-the-icons-faicon "tag" :face 'all-the-icons-red))
          (Struct        . ,(all-the-icons-faicon "cog" :face 'all-the-icons-red))
          (Event         . ,(all-the-icons-faicon "bolt" :face 'all-the-icons-red))
          (Operator      . ,(all-the-icons-faicon "tag" :face 'all-the-icons-red))
          (TypeParameter . ,(all-the-icons-faicon "cog" :face 'all-the-icons-red))
          (Template      . ,(all-the-icons-faicon "bookmark" :face 'all-the-icons-dgreen)))))

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

No branches or pull requests

2 participants