diff --git a/doom-modeline-core.el b/doom-modeline-core.el index bb6bbe1..268a193 100644 --- a/doom-modeline-core.el +++ b/doom-modeline-core.el @@ -463,11 +463,6 @@ It returns a file name which can be used directly as argument of "The face used for the left-most bar in the mode-line of an inactive window." :group 'doom-modeline-faces) -(defface doom-modeline-icon-inactive - `((t (:foreground ,(face-foreground 'mode-line-inactive)))) - "The face used for the icon in the mode-line of an inactive window." - :group 'doom-modeline-faces) - (defface doom-modeline-debug-visual `((t (:background ,(face-foreground 'all-the-icons-orange)))) "Face to use for the mode-line while debugging." @@ -846,7 +841,7 @@ It returns a file name which can be used directly as argument of ;; break them if the font family is set. ;; @see https://github.com/seagle0128/doom-modeline/issues/301 (when (eq face 'mode-line-inactive) - (plist-put args :face 'doom-modeline-icon-inactive)) + (plist-put args :face nil)) (pcase icon-set ('octicon diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index d19ad04..7863754 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -359,13 +359,11 @@ mouse-1: Previous buffer\nmouse-3: Next buffer" (when-let ((icon (or doom-modeline--buffer-file-icon (doom-modeline-update-buffer-file-icon)))) (concat - (if (doom-modeline--active) - (if doom-modeline-major-mode-color-icon - icon - (propertize icon 'face `(:inherit ,(get-text-property 0 'face icon) - :foreground ,(face-foreground 'mode-line)))) - (propertize icon 'face `(:inherit ,(get-text-property 0 'face icon) - :inherit doom-modeline-icon-inactive))) + (if (and (doom-modeline--active) doom-modeline-major-mode-color-icon) + icon + (propertize icon 'face (plist-put + (copy-list (get-text-property 0 'face icon)) + :inherit nil))) (doom-modeline-vspc))))) (defsubst doom-modeline--buffer-state-icon () @@ -375,8 +373,9 @@ mouse-1: Previous buffer\nmouse-3: Next buffer" (concat (if (doom-modeline--active) icon - (propertize icon 'face `(:inherit ,(get-text-property 0 'face icon) - :inherit doom-modeline-icon-inactive))) + (propertize icon 'face (plist-put + (copy-list (get-text-property 0 'face icon)) + :inherit nil))) (doom-modeline-vspc))))) (defsubst doom-modeline--buffer-name () @@ -654,9 +653,9 @@ Uses `all-the-icons-octicon' to fetch the icon." (concat (if active icon - (propertize icon - 'face `(:inherit ,(get-text-property 0 'face icon) - :inherit doom-modeline-icon-inactive))) + (propertize icon 'face (plist-put + (copy-list (get-text-property 0 'face icon)) + :inherit nil))) (doom-modeline-vspc)) 'mouse-face 'mode-line-highlight 'help-echo (get-text-property 1 'help-echo vc-mode) @@ -995,8 +994,9 @@ mouse-1: List all problems%s" (when icon (if active icon - (propertize icon 'face `(:inherit ,(get-text-property 0 'face icon) - :inherit doom-modeline-icon-inactive)))) + (propertize icon 'face (plist-put + (copy-list (get-text-property 0 'face icon)) + :inherit nil)))) (when text (concat (doom-modeline-vspc) @@ -1808,8 +1808,9 @@ mouse-1: Start server")) (doom-modeline-spc) (if active icon - (propertize icon 'face `(:inherit ,(get-text-property 0 'face icon) - :foreground ,(face-foreground 'mode-line-inactive)))) + (propertize icon 'face (plist-put + (copy-list (get-text-property 0 'face icon)) + :inherit nil))) (doom-modeline-spc)))))) (defun doom-modeline-override-eglot-modeline ()