dbordak / telephone-line

A new implementation of Powerline for Emacs
GNU General Public License v3.0
553 stars 50 forks source link

Vertical flat separator #42

Closed ogdenwebb closed 7 years ago

ogdenwebb commented 7 years ago

Is the telephone-line-nil using to create vertical flat separator, i.e. | *segment* |? If so, there's a problem with telephone-line-height, because it grows horizontally instead of vertically.

Without custom height: screenshot-2017-06-11_16-45-41 With the following:

  (setq telephone-line-height 20)

screenshot-2017-06-11_16-46-25

Other separators work fine with telephone-line-height.

dbordak commented 7 years ago

This is technically working as intended -- telephone-line-height is working fine, but the default width of all separators is 1/2 their height. I do agree, however, that this shouldn't be the case for nil.

dbordak commented 7 years ago

Turns out this was actually a different issue -- nil had a division by zero (the zero being the range of values).

Latest commit makes the nil separator a subclass which bypasses the rendering code to just return nil. Let me know if this works better.

ogdenwebb commented 7 years ago

@dbordak, nope, all the same. Damn, forget that isn't the recent update from MELPA.

UPD: By the way, the most latest git version doesn't fix this behavior.

dbordak commented 7 years ago

Oh, just realized what the issue actually is...

So, telephone-line-height only changes the height of the separator images -- no other way to influence mode-line height. If I'm not rendering any images, there's no way to control the height of the mode-line.

dbordak commented 7 years ago

Ok, latest commit finally fixes this. Test it out and let me know for sure.

dbordak commented 7 years ago

I might rename this separator in the future since it's no longer a noop (if I do, I'll include the old nil separator under this name). I guess telephone-line-flat?

ogdenwebb commented 7 years ago

The 6789e79806a188e278af8fb27dc65a28dbaf7505 fixes the issue, works as excepted. Thanks. Now the issue can be closed.

I might rename this separator in the future since it's no longer a noop (if I do, I'll include the old nil separator under this name). I guess telephone-line-flat?

Yes, telephone-line-nil is not obvious for me, so that's a good idea to rename it. telephone-line-flat is fine.

Also would be nice if you add info about this separator to README.md.

dbordak commented 7 years ago

Yeah, I'm going to do the rename and update the README. Only reason it wasn't already there is because... well, there's nothing to look at (the separators shown there are all taken directly from telephone-line -- they're the internal XPMs converted to PNGs, not screenshots).

dbordak commented 7 years ago

Alright, it's been renamed.