From eae4e83bf2cf552fd7cbc1e992c89ec0982fb248 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Tue, 25 Dec 2018 01:51:27 +0800 Subject: [PATCH] Optimize: update icon positions. --- doom-modeline.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/doom-modeline.el b/doom-modeline.el index 3a1a06c..f4f61d7 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -775,7 +775,9 @@ Uses `all-the-icons-material' to fetch the icon." ((buffer-modified-p) (doom-modeline-buffer-file-state-icon "save" - 'doom-modeline-buffer-modified)) + 'doom-modeline-buffer-modified + 1.05 + -0.22)) ((and buffer-file-name (not (file-exists-p buffer-file-name))) (doom-modeline-buffer-file-state-icon @@ -784,7 +786,9 @@ Uses `all-the-icons-material' to fetch the icon." ((buffer-narrowed-p) (doom-modeline-buffer-file-state-icon "unfold_less" - 'doom-modeline-warning))))) + 'doom-modeline-warning + 1.1 + -0.225))))) (add-hook 'find-file-hook 'doom-modeline-update-buffer-file-state-icon) (add-hook 'after-save-hook 'doom-modeline-update-buffer-file-state-icon) (add-hook 'after-revert-hook 'doom-modeline-update-buffer-file-state-icon) @@ -1019,11 +1023,7 @@ Uses `all-the-icons-material' to fetch the icon." (concat " " (when icon (concat - (doom-modeline-icon-material - icon - :face face - :height (if (eq system-type 'darwin) 1.0 0.96) - :v-adjust (or voffset (if (eq system-type 'darwin) -0.225 -0.205))) + (doom-modeline-icon-material icon :face face :height 1.1 :v-adjust (or voffset -0.2)) (if text doom-modeline-vspc))) (if text (propertize text 'face face)) " ")) @@ -1039,9 +1039,10 @@ Uses `all-the-icons-material' to fetch the icon." (let ((sum (+ (or .error 0) (or .warning 0)))) (doom-modeline-flycheck-icon "do_not_disturb_alt" (number-to-string sum) - (if .error 'doom-modeline-urgent 'doom-modeline-warning)))) + (if .error 'doom-modeline-urgent 'doom-modeline-warning) + -0.225))) (doom-modeline-flycheck-icon "check" nil 'doom-modeline-info))) - (`running (doom-modeline-flycheck-icon "access_time" nil 'font-lock-doc-face -0.25)) + (`running (doom-modeline-flycheck-icon "access_time" nil 'font-lock-doc-face -0.225)) (`no-checker (doom-modeline-flycheck-icon "sim_card_alert" "-" 'font-lock-doc-face)) (`errored (doom-modeline-flycheck-icon "sim_card_alert" "Error" 'doom-modeline-urgent)) (`interrupted (doom-modeline-flycheck-icon "pause" "Interrupted" 'font-lock-doc-face))