vicoapp / vico

Mac Programmers Text Editor
http://www.vicoapp.com/
657 stars 89 forks source link

Now You See Me: Toggle window opacity based on theme background. #64

Closed Shadowfiend closed 10 years ago

Shadowfiend commented 10 years ago

This is a more complete fix for #63, toggling a window's opacity setting based on the theme background's alpha channel.

I will confess to not having tested it, and I will confess I haven't tested vico before these changes either to see if it actually correctly implements transparent backgrounds. I'll give it more love if anyone gives any specific feedback here, but otherwise we'll stick to this solution until I hear from someone who actually needs it that it doesn't work ;)

peteschaffner commented 10 years ago

Sweet! My windows are finally opaque, the shadows look normal, and I can sleep sound at night.

I did run a quick test, though, and it looks like the window isn't drawing as non-opaque when intended ... of course I don't need this feature, so I'm not complaining ;)

I will close #63.

Shadowfiend commented 10 years ago

Did you check before these changes to see if transparent backgrounds worked?

peteschaffner commented 10 years ago

Oh yeah, sorry I forgot to mention that. I did check this and background opacity seemed to work just fine. Note, that to give a theme a transparent background, append the desired alpha [percentage] number to the background key under the settings dictionary like so:

<key>background</key>
<string>#FFFFFF90</string>
Shadowfiend commented 10 years ago

Yeah, that's what I did. I'll try to explore that some more either tonight or tomorrow.

peteschaffner commented 10 years ago

Cool. Don't worry about it too much ... says the guy who doesn't care about opacity :P

Shadowfiend commented 10 years ago

If you wouldn't mind giving that a quick shot, I think I fixed that, as well. If there's code in there to make opacity change, I would like for it to work :D

peteschaffner commented 10 years ago

Just tested both cases mentioned in your commit messages (switching to a semi-transparent theme and launching the app w/ a semi-transparent theme set) and both worked flawlessly for me.

Nice work!

Shadowfiend commented 10 years ago

Rock on! Going to merge this feller, too, then.

peteschaffner commented 10 years ago

You're on a mergin' roll!

Shadowfiend commented 10 years ago

Aww yeah.