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

Fix powerline separators and make them configurable #19

Merged
merged 2 commits into from
Oct 19, 2014

Conversation

trishume
Copy link
Contributor

This fixes #18. Powerline dividers now render at the right height on emacs cocoa, they are still aliased but that can be another PR.

This also allows the powerline separator to be configured by the user using the powerline-default-separator variable that is built into powerline.

The problem was that to fix another bug powerline stopped calculating the height of the bar and used the font height for the separators. I think one of the fancy spacemacs things made the bar higher than the font height, causing the separators to be the wrong height. This was fixed by setting the powerline-height variable to a reasonable value.

The other changes are unrelated to the bug, they just make the theme use the powerline-default-separator variable so that it can be changed by the user. My editor (currently ST3, but that will change soon) also trimmed all trailing whitespace in the file, not a bad thing.

Edit: I also fixed the aliasing a bit. See my comment for an updated screenshot.

Screenshot:

screen shot 2014-10-18 at 10 54 49 am
(taken after height fix but before aliasing fix.)

@trishume
Copy link
Contributor Author

While reading through the powerline image code I realized it has really terrible not-actually-antialiasing built in, but it didn't activate if either of the passed in faces was nil. So I passed in the correct mode line face and now things look slightly better.

Screenshot:

digitalcolor_meter

syl20bnr added a commit that referenced this pull request Oct 19, 2014
Fix powerline separators and make them configurable
@syl20bnr syl20bnr merged commit c6acb27 into syl20bnr:master Oct 19, 2014
@syl20bnr
Copy link
Owner

@trishume That's really great!
Tested it on Windows as well and it is way better but somehow on my windows box the correct height value is 18 instead of 17. On X 17 is alright. Anyway this is a great PR, thank you!

On this screenshot, we can see that the height is not correct in the vertical progress bar on the right.

powerline-fix-windows

I will set the height conditionally depending on the OS for now until we find a good way to compute the height (if we find any).

👍

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

Successfully merging this pull request may close these issues.

Powerline dividers look terrible in some emacs window toolkits
2 participants