sebastiencs / company-box

A company front-end with icons
565 stars 64 forks source link

Material icon vertically misaligned regardless of v-adjust #116

Closed angrybacon closed 4 years ago

angrybacon commented 4 years ago

The issue is independent of font size and family for my default face but I get different results with other font families in all-the-icons. I've put a screenshot of the issue, hopefully more visible with the highlighted face.

The all-the-icons call seems fine with an adjusted value of v-adjust. But setting up the same icon with the same values within company-box, icons are always at the top-most position.

image

This is what company-box-icons-all-the-icons's value looks like in a *Help* buffer from describe-variable.

image

And this is how I setup company-box:

;;; -*- lexical-binding: t -*-

(use-package company-box
  :after company
  :hook
  (company-mode . company-box-mode)
  :custom
  (company-box-icons-alist 'company-box-icons-all-the-icons)
  (company-box-icons-all-the-icons
   (let ((all-the-icons-default-adjust -.15)
         (all-the-icons-scale-factor .8)
         (red 'all-the-icons-red))
     `(...
       (Variable . ,(all-the-icons-material "adjust" :face red))
       ...)))
  (company-box-scrollbar nil)
  (company-box-show-single-candidate nil))
sebastiencs commented 4 years ago

Thanks for reporting this @angrybacon. I know what is causing this issue I will fix it

sebastiencs commented 4 years ago

@angrybacon It should be fixed with https://github.com/sebastiencs/company-box/commit/d8f71fde7a3301a62f9f6f627aa51610a294f4df, can you confirm ?

angrybacon commented 4 years ago

@sebastiencs Thanks, looks like that fixed it 👍