Adjust the position of the last icon.

The widths of battery icons > 2 characters.
This commit is contained in:
Vincent Zhang 2019-04-29 11:34:06 +08:00
parent 2812a96c40
commit d103243e2a
2 changed files with 6 additions and 3 deletions

View file

@ -81,10 +81,10 @@ It returns a file name which can be used directly as argument of
;; TODO: better performance? ;; TODO: better performance?
(doom-moddeline--set-font-widths all-the-icons-data/alltheicons-alist) (doom-moddeline--set-font-widths all-the-icons-data/alltheicons-alist)
;; (doom-moddeline--set-font-widths all-the-icons-data/file-icon-alist) ;; (doom-moddeline--set-font-widths all-the-icons-data/file-icon-alist)
(doom-moddeline--set-font-widths all-the-icons-data/fa-icon-alist)
(doom-moddeline--set-font-widths all-the-icons-data/octicons-alist)
;; (doom-moddeline--set-font-widths all-the-icons-data/weather-icons-alist) ;; (doom-moddeline--set-font-widths all-the-icons-data/weather-icons-alist)
(doom-moddeline--set-font-widths all-the-icons-data/octicons-alist)
(doom-moddeline--set-font-widths all-the-icons-data/material-icons-alist) (doom-moddeline--set-font-widths all-the-icons-data/material-icons-alist)
(doom-moddeline--set-font-widths all-the-icons-data/fa-icon-alist)
;; ;;

View file

@ -922,7 +922,10 @@ icons."
:inherit :inherit
mode-line-inactive))) mode-line-inactive)))
(when (and doom-modeline-icon icon text) doom-modeline-inactive-vspc) (when (and doom-modeline-icon icon text) doom-modeline-inactive-vspc)
(when text (propertize text 'face 'mode-line-inactive)))))) (when text (propertize text 'face 'mode-line-inactive))))
;; Adjust the position of the last icon
(if (and (display-graphic-p) (bound-and-true-p fancy-battery-mode))
(propertize " " 'face (if active 'mode-line 'mode-line-inactive)))))
""))) "")))