Closed Eason0210 closed 4 years ago
I noticed similar problems using the default theme:
But the color shows correctly on my side.
It works with doom-themes:
That's why I didn't notice the problem when I submit the patch.
The following code solves the font problem:
(set-face-attribute 'tab-line nil :inherit 'default)
You see sans-serif fonts because the face tab-line
inherits variable-pitch
by default.
I have no idea on the color problem. Does it happen with $ emacs -Q
?
Edit: I didn't notice that you said the color problem only happens to dired mode and log message. My fault. I can confirm this happens to $ emacs -Q
.
@AmaiKinono You are right. (set-face-attribute 'tab-line nil :inherit 'default)
solves the font face issue. Thanks
Newest version has fixed this issue.
There's still the color problem. It can be easily solved by:
(set-face-attribute 'tab-line nil
:inherit 'default
:foreground 'unspecified)
Emacs specifies foreground and background for tab-line
, but not for header-line
(I don't know why the have such a strong opinion on what should tab-line look like). I suspect the background color would also cause problems later. And, if Emacs people decide to add more attributes, then we'll have to deal with them.
To solve it once and for all:
(face-spec-set awesome-tab-display-line
'((t :inherit 'default))
'face-defface-spec)
Which redefines the face, rather then overriding the attributes of it.
cc @manateelazycat
Edit: For whoever is interested, If you are writing a mode that sets some faces like this when enabled, and want to restore them when disabled, you could cache the original value beforehand:
(get awesome-tab-display-line 'face-defface-spec)
and set the faces to the cached values later. Awesome-tab could also do this, but maybe it's not that necessary since tab-line
are not likely to be used for other things.
Thanks for tips, I have commit new patch to fix this issue.
When update to new version. The font of Tab doesn't follow theme's setting. And the color of icon shows black color when the buffer is dired mode or log message.