Fix powerline separators and make them configurable #19

Merged
merged 2 commits into from Oct 19, 2014

Projects

None yet

2 participants

@trishume
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
Contributor

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 syl20bnr merged commit c6acb27 into syl20bnr:master Oct 19, 2014
@syl20bnr
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