Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong icon color and font face #96

Closed
Eason0210 opened this issue Oct 27, 2020 · 5 comments
Closed

wrong icon color and font face #96

Eason0210 opened this issue Oct 27, 2020 · 5 comments

Comments

@Eason0210
Copy link

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.

image

@AmaiKinono
Copy link
Contributor

AmaiKinono commented Oct 27, 2020

I noticed similar problems using the default theme:

image

But the color shows correctly on my side.

It works with doom-themes:

image

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.

@Eason0210
Copy link
Author

Eason0210 commented Oct 27, 2020

@AmaiKinono You are right. (set-face-attribute 'tab-line nil :inherit 'default) solves the font face issue. Thanks

@AmaiKinono AmaiKinono mentioned this issue Oct 27, 2020
@manateelazycat
Copy link
Owner

Newest version has fixed this issue.

@AmaiKinono
Copy link
Contributor

AmaiKinono commented Oct 29, 2020

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.

@manateelazycat
Copy link
Owner

Thanks for tips, I have commit new patch to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants