dbordak / telephone-line

A new implementation of Powerline for Emacs
GNU General Public License v3.0
554 stars 51 forks source link

Weird custom face rendering #47

Closed xahon closed 6 years ago

xahon commented 7 years ago

Here is my init file chunk of config

I took code from this example

(use-package telephone-line
    :config
  (defface my-custom-face
      '((t (:background "white" :foreground "blue"))) "")

  (setq telephone-line-faces
        '((custom-color . (my-custom-face . my-custom-face ))
          (nil . (mode-line . mode-line-inactive))
          (accent . (telephone-line-accent-active . telephone-line-accent-inactive))))

  (setq telephone-line-lhs
        '((custom-color . (telephone-line-buffer-segment))
          (nil    . (telephone-line-vc-segment))
          (accent . (telephone-line-major-mode-segment))))
  (telephone-line-mode 1))

Here is actual bevahior

image

dbordak commented 7 years ago

That's odd... Not sure how that's inheriting the border... Or why the height doesn't seem to be working properly...

Does it look ok with the default config?

xahon commented 7 years ago

@dbordak yes, default config works fine. But it uses only 2 different colors (3 in evil). So i wanted to configure multiple colored segments

dbordak commented 7 years ago

Well, first thing I'd try doing is extending your custom face from an existing face (probably either mode-line or one of the telephone-line faces). To be honest, that example is pretty bad for a reference; I mostly only hosted it so I could re-generate the screenshots in the future.

So, something like

(defface my-custom-face
  '((t (:background "white" :foreground "blue" :inherit mode-line)))
dbordak commented 7 years ago

Actually, this might just be some bad interaction with telephone-line-buffer-segment and a non-nil supersegment. If it is, it's a bug and I'll fix it, but could you try using a different segment in your custom-color block?

Try the earlier thing, first, though.

dbordak commented 7 years ago

Oh, right! Third thing, could you check your messages/warnings buffers for anything relevant? Now that I look at it a bit more, I'm fairly certain this is because of a malformed XPM.