AnthonyDiGirolamo / airline-themes

vim-airline themes https://github.com/vim-airline/vim-airline-themes for emacs powerline https://github.com/milkypostman/powerline
MIT License
124 stars 20 forks source link

Emacs focus gained/lost airline-themes rendering issue, OS X #20

Open srustamo opened 7 years ago

srustamo commented 7 years ago

When switching away from GUI Emacs to another app, say with Cmd Tab, then returning to it, mode line looks so:

focus_lost

Clicking on anywhere on Emacs screen or hitting any key would re-render mode line properly, so:

focus_gained

GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21) of 2015-05-01

rpinder commented 7 years ago

I managed to solve this problem by editing airline-solarized-gui-theme.el

by changing lines 27, 28, and 29 to this:

(inactive1-foreground (face-foreground 'fringe)) (inactive1-background "#465459")  ; (face-background 'highlight))
(inactive2-foreground (face-foreground 'fringe)) (inactive2-background "#778182")  ; (face-background 'highlight))
(inactive3-foreground (face-foreground 'fringe)) (inactive3-background "#dbd6c8")) ; (face-background 'highlight)))

This is what it looks like: image

srustamo commented 7 years ago

Thanks, this is helpful. Do you see a slight difference in vertical size between my screenshot and yours? Yours is perhaps a pixel taller, still breaks the visual appeal a bit.

I changed something in my set up and now can't remember what, but now I have this extra height, which I did not have. Incidentally, some airline themes don't have this extra hight, can't figure out what it depends on.

Yak shaving, of course, but wonder what happened.

AnthonyDiGirolamo commented 7 years ago

In terms of height differences I've gotten mixed results with the powerline glyphs using different fonts while using emacs on the terminal.

When using GUI emacs powerline draws its own image based glyphs and doesn't require a patched font.

iterm2 on osx lets you set different fonts and sizes for utf8 character drawing and that mostly lets me correct it.

AnthonyDiGirolamo commented 7 years ago

Looks like I need to update the solarized themes with the actual hex color values. I'll do that asap

everwwww commented 7 years ago

ehh.. i find this issue also disappointed me much. im using Linux, and the airline dark theme. i hope there can be an option that no need for the airline to be different look whether active or not.