Optimize: material icons.

This commit is contained in:
Vincent Zhang 2018-12-12 22:53:35 +08:00
parent b7bc345b44
commit 4a7100b5fd

View file

@ -744,7 +744,7 @@ buffer where knowing the current project directory is important."
(concat (concat
(propertize icon (propertize icon
'help-echo (format "Major-mode: `%s'" major-mode) 'help-echo (format "Major-mode: `%s'" major-mode)
'display '(raise -0.15) 'display '(raise -0.125)
'face `(:height 1.1 :family ,(all-the-icons-icon-family-for-mode major-mode) :inherit)) 'face `(:height 1.1 :family ,(all-the-icons-icon-family-for-mode major-mode) :inherit))
doom-modeline-vspc))))) doom-modeline-vspc)))))
(add-hook 'find-file-hook 'doom-modeline-update-buffer-file-icon) (add-hook 'find-file-hook 'doom-modeline-update-buffer-file-icon)
@ -768,23 +768,23 @@ buffer where knowing the current project directory is important."
(concat (doom-modeline-icon-material (concat (doom-modeline-icon-material
"lock" "lock"
:face (if active 'doom-modeline-warning) :face (if active 'doom-modeline-warning)
:height 1.1 :height 1.0
:v-adjust -0.2) :v-adjust -0.225)
doom-modeline-vspc)) doom-modeline-vspc))
((buffer-modified-p) ((buffer-modified-p)
(concat (doom-modeline-icon-material (concat (doom-modeline-icon-material
"save" "save"
:face (if active 'doom-modeline-buffer-modified) :face (if active 'doom-modeline-buffer-modified)
:height 1.1 :height 1.0
:v-adjust -0.2) :v-adjust -0.225)
doom-modeline-vspc)) doom-modeline-vspc))
((and buffer-file-name ((and buffer-file-name
(not (file-exists-p buffer-file-name))) (not (file-exists-p buffer-file-name)))
(concat (doom-modeline-icon-material (concat (doom-modeline-icon-material
"do_not_disturb_alt" "do_not_disturb_alt"
:face (if active 'doom-modeline-urgent) :face (if active 'doom-modeline-urgent)
:height 1.1 :height 1.0
:v-adjust -0.2) :v-adjust -0.225)
doom-modeline-vspc)) doom-modeline-vspc))
((buffer-narrowed-p) ((buffer-narrowed-p)
(concat (doom-modeline-icon-material (concat (doom-modeline-icon-material
@ -990,7 +990,7 @@ Uses `all-the-icons-material' to fetch the icon."
(concat " " (concat " "
(when icon (when icon
(concat (concat
(doom-modeline-icon-material icon :face face :height 0.95 :v-adjust (or voffset -0.2)) (doom-modeline-icon-material icon :face face :height 1.0 :v-adjust (or voffset -0.225))
(if text doom-modeline-vspc))) (if text doom-modeline-vspc)))
(if text (propertize text 'face face)) (if text (propertize text 'face face))
" ")) " "))
@ -1006,8 +1006,7 @@ Uses `all-the-icons-material' to fetch the icon."
(let ((sum (+ (or .error 0) (or .warning 0)))) (let ((sum (+ (or .error 0) (or .warning 0))))
(doom-modeline-flycheck-icon "do_not_disturb_alt" (doom-modeline-flycheck-icon "do_not_disturb_alt"
(number-to-string sum) (number-to-string sum)
(if .error 'doom-modeline-urgent 'doom-modeline-warning) (if .error 'doom-modeline-urgent 'doom-modeline-warning))))
-0.2)))
(doom-modeline-flycheck-icon "check" nil 'doom-modeline-info))) (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.25))
(`no-checker (doom-modeline-flycheck-icon "sim_card_alert" "-" 'font-lock-doc-face)) (`no-checker (doom-modeline-flycheck-icon "sim_card_alert" "-" 'font-lock-doc-face))