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

Support for line number and mode line faces #4

Open
ashlineldridge opened this issue Jan 16, 2024 · 10 comments
Open

Support for line number and mode line faces #4

ashlineldridge opened this issue Jan 16, 2024 · 10 comments

Comments

@ashlineldridge
Copy link

Thanks for the great package.

I've been using a less sophisticated hand-rolled version to help with switching between working on my laptop and working at a wide-screen monitor.

Would you consider adding support for mode line and line number faces? I have grown attached to having the line number height be smaller than the main text and italicizing the line number face.

Screenshot 2024-01-17 at 7 24 09 am

Another face that would be handy to be able to configure is the mode line face, which I also find is more visually appealing when it is slightly smaller than the main text.

@protesilaos
Copy link
Owner

protesilaos commented Feb 8, 2024 via email

@protesilaos
Copy link
Owner

Sorry for being slow to respond, by the way. My typing time is limited due to a pain in a my left arm.

@ashlineldridge
Copy link
Author

Thanks for the response, @protesilaos. Sorry to hear about your arm - I do hope it is improving.

Good idea! Though note that we do not support a different slant for the
given face. So we would need to add that feature as well.

Ah, I see.

I like this! Is it the 'mode-line', 'mode-line-active', and 'mode-line-inactive' faces you have in mind?

In my config, I set both the mode-line-active and mode-line-inactive faces. I found that if I only set mode-line then the inactive mode line will use a different face even though mode-line-inactive inherits from mode-line (didn't dig into why).

protesilaos added a commit that referenced this issue Feb 19, 2024
Thanks to Ashlin Eldridge for suggesting the inclusion of mode line
and line number faces. This was done in issue 4:
<#4>.
@protesilaos
Copy link
Owner

Hello again! I just added support for the extra faces. I included the header-line as well. Will also do it for the tab-bar-mode and tab-line-mode.

@protesilaos
Copy link
Owner

Next up is to support a slant per face.

@ashlineldridge
Copy link
Author

Thanks a lot, @protesilaos! I appreciate the work. Will update and check it out.

@protesilaos
Copy link
Owner

Hello again! Recent changes include support for font slants as well. If you do try the development version, please let me know how it goes.

@ashlineldridge
Copy link
Author

Hi @protesilaos, I've tried out the changes and they work really well! I can replace my custom setup with Fontaine now!

I did notice a couple of inconsistencies with the other faces though:

  1. The mode line and line number families don't seem to fall back to :default-family and I need to specifically set :mode-line-active-family, :mode-line-inactive-family, and :line-number-family.
  2. When using relative/decimal font heights for the two mode line faces, something odd happens with doom-modeline where the active mode line gets displayed with multiple different font sizes whereas the inactive mode line does not. This doesn't happen when using absolute sizes. The screenshot below shows the issue - I've specified a face height of 1.2 for both :mode-line-active-height and :mode-line-inactive-height. This seems to be a doom-modeline issue, however, as when I used the default mode line the issue doesn't occur.
Screenshot 2024-02-26 at 8 03 20 am

@protesilaos
Copy link
Owner

protesilaos commented Feb 26, 2024 via email

@ashlineldridge
Copy link
Author

Apologies for the very late reply. I'm quite sure this issue is doom-modeline specific at this point. However, I wasn't able to use list-faces-display to diagnose the specific faces in doom-modeline that were problematic as the sizes of the faces aren't previewed for me. Is that what you were suggesting? That I should try spot the faces that don't appear to have 2.0 applied?

Screenshot 2024-03-24 at 7 07 12 AM

I did see seagle0128/doom-modeline#704 and thought it could be related but it the corresponding PR doesn't seem to affect the issue I described.

It's not a big deal for me to specify absolute face sizes to work around this. So I'm still able to use Fontaine and it's an improvement over what I had before.

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

No branches or pull requests

2 participants