gonewest818 / dimmer.el

Interactively highlight which buffer is active by dimming the others.
GNU General Public License v3.0
267 stars 14 forks source link

Propertized text (foreground or background) is not dimmed in the mode-line? #55

Closed Dima-369 closed 3 years ago

Dima-369 commented 3 years ago

If I make any text in the mode-line colored, it is not getting dimmed and stays the original color, regardless if I set a foreground or background. Regular text is getting dimmed correctly as seen below.

Is there a way to fix this?

I am appending strings like that to global-mode-string:

(propertize " red " 'font-lock-face '(:foreground "red"))

It looks like this for me in Emacs 27.2:

image

Dima-369 commented 3 years ago

Hmm, so I checked with https://github.com/seagle0128/doom-modeline and there the dimming works without problems on colored text and icons, so it must be on my side:

image

Dima-369 commented 3 years ago

Ah, dimming of the mode-line is not related to dimmer.el at all.

Not that I have fixed it yet, but this is unrelated to this package :)

Dima-369 commented 3 years ago

I suppose that one needs to use (selected-window) and depending on its result use propertize or not.

Here is a good example: https://emacs.stackexchange.com/a/26345/30652