Fix: invalid icons after setting modeline fonts.

This commit is contained in:
Vincent Zhang 2019-03-04 00:53:20 +07:00
parent b1b51de36a
commit 9c283f50bd

View file

@ -310,8 +310,7 @@ directory, the file name, and its state (modified, read-only or non-existent)."
;; major mode icon ;; major mode icon
(when (and doom-modeline-icon doom-modeline-major-mode-icon) (when (and doom-modeline-icon doom-modeline-major-mode-icon)
(when-let ((icon (or doom-modeline--buffer-file-icon (when-let ((icon (or doom-modeline--buffer-file-icon
(doom-modeline-update-buffer-file-icon))) (doom-modeline-update-buffer-file-icon))))
(face (if active 'mode-line 'mode-line-inactive)))
(concat (concat
(if (and active doom-modeline-major-mode-color-icon) (if (and active doom-modeline-major-mode-color-icon)
icon icon
@ -319,8 +318,7 @@ directory, the file name, and its state (modified, read-only or non-existent)."
'face `(:height 'face `(:height
,(doom-modeline-icon-height 1.1) ,(doom-modeline-icon-height 1.1)
:family :family
,(all-the-icons-icon-family icon) ,(all-the-icons-icon-family icon))))
:inherit ,face)))
(if active doom-modeline-vspc doom-modeline-inactive-vspc)))) (if active doom-modeline-vspc doom-modeline-inactive-vspc))))
;; state icon ;; state icon
@ -335,8 +333,7 @@ directory, the file name, and its state (modified, read-only or non-existent)."
`(:height `(:height
,(doom-modeline-icon-height 1.3) ,(doom-modeline-icon-height 1.3)
:family :family
,(all-the-icons-icon-family icon) ,(all-the-icons-icon-family icon))
:inherit mode-line-inactive)
'mode-line-inactive))) 'mode-line-inactive)))
(if active doom-modeline-vspc doom-modeline-inactive-vspc))) (if active doom-modeline-vspc doom-modeline-inactive-vspc)))
@ -539,8 +536,7 @@ Uses `all-the-icons-octicon' to fetch the icon."
`(:height `(:height
,(doom-modeline-icon-height 1.2) ,(doom-modeline-icon-height 1.2)
:family :family
,(all-the-icons-icon-family icon) ,(all-the-icons-icon-family icon))
:inherit mode-line-inactive)
'mode-line-inactive)) 'mode-line-inactive))
doom-modeline-inactive-vspc doom-modeline-inactive-vspc
(propertize text 'face 'mode-line-inactive))) (propertize text 'face 'mode-line-inactive)))
@ -853,8 +849,7 @@ icons."
`(:height `(:height
,(doom-modeline-icon-height 1.3) ,(doom-modeline-icon-height 1.3)
:family :family
,(all-the-icons-icon-family icon) ,(all-the-icons-icon-family icon))
:inherit mode-line-inactive)
'mode-line-inactive))) 'mode-line-inactive)))
(when (and icon text) doom-modeline-inactive-vspc) (when (and icon text) doom-modeline-inactive-vspc)
(when text (propertize text 'face 'mode-line-inactive)))) (when text (propertize text 'face 'mode-line-inactive))))