Fix: not same size of state icon in active and inactive windows.

This commit is contained in:
Vincent Zhang 2018-12-30 00:15:35 +08:00
parent 7fda2d9127
commit 3c7ad2f3d8

View file

@ -766,8 +766,8 @@ Uses `all-the-icons-material' to fetch the icon."
(doom-modeline-icon-material (doom-modeline-icon-material
icon icon
:face (if (doom-modeline--active) face) :face (if (doom-modeline--active) face)
:height (or height 1.1) :height (or height 1.0)
:v-adjust (or voffset -0.225)))) :v-adjust (or voffset -0.215))))
(defvar-local doom-modeline--buffer-file-state-icon nil) (defvar-local doom-modeline--buffer-file-state-icon nil)
(defun doom-modeline-update-buffer-file-state-icon (&rest _) (defun doom-modeline-update-buffer-file-state-icon (&rest _)
@ -776,9 +776,7 @@ Uses `all-the-icons-material' to fetch the icon."
(cond (buffer-read-only (cond (buffer-read-only
(doom-modeline-buffer-file-state-icon (doom-modeline-buffer-file-state-icon
"lock" "lock"
'doom-modeline-warning 'doom-modeline-warning))
1.0
-0.215))
((buffer-modified-p) ((buffer-modified-p)
(doom-modeline-buffer-file-state-icon (doom-modeline-buffer-file-state-icon
"save" "save"
@ -787,9 +785,7 @@ Uses `all-the-icons-material' to fetch the icon."
(not (file-exists-p buffer-file-name))) (not (file-exists-p buffer-file-name)))
(doom-modeline-buffer-file-state-icon (doom-modeline-buffer-file-state-icon
"do_not_disturb_alt" "do_not_disturb_alt"
'doom-modeline-urgent 'doom-modeline-urgent))
1.0
-0.215))
((buffer-narrowed-p) ((buffer-narrowed-p)
(doom-modeline-buffer-file-state-icon (doom-modeline-buffer-file-state-icon
"vertical_align_center" "vertical_align_center"