Optimize doom-modeline--font-height.

This commit is contained in:
Vincent Zhang 2019-07-01 19:47:47 +08:00
parent 68362f248e
commit 1c092cbd17

View file

@ -500,9 +500,9 @@ If the actual char height is larger, it respects the actual char height.")
(defun doom-modeline--font-height () (defun doom-modeline--font-height ()
"Calculate the actual char height of the mode-line." "Calculate the actual char height of the mode-line."
(let ((height (face-attribute 'mode-line :height))) (let ((height (face-attribute 'mode-line :height)))
(round (* 0.168 (if (number-or-marker-p height) (round (* 1.68 (if (number-or-marker-p height)
height (/ height 10)
(* (frame-char-height) 10)))))) (frame-char-height))))))
(defun doom-modeline-icon-octicon (&rest args) (defun doom-modeline-icon-octicon (&rest args)
"Display octicon via ARGS." "Display octicon via ARGS."