codler / Battery-Time-Remaining

Show battery time remaining in Mac OS X 10.8+ Mountain Lion and Mavericks
http://yap.nu/battery-time-remaining/
Other
412 stars 72 forks source link

Draw white shadow underneath menubar icon #5

Closed KelseyHigham closed 12 years ago

KelseyHigham commented 12 years ago

The text is fine, but the icon is missing it!

codler commented 12 years ago

Why is it needed? Have you customized your menubar or? The text don't have white shadow.

Could you tell me some more details like what computer you have and a screenshot of how it look now?

KelseyHigham commented 12 years ago

I haven't customized my menubar at all; this is all with the default OS X theme.


Every item in the OS X menubar has a faint white shadow underneath, to make it look like all the text and icons are indented.

It's clearer with a black desktop background: http://cl.ly/image/2x1v1J2i1x0B/o

And even clearer when you take a transparent screenshot of SystemUIServer: http://cl.ly/image/353o0Q0i1S3P/o

And here's a screenshot of Battery Time Remaining — with a shadow under the text, but not under the icon: http://cl.ly/image/2u0K2Q1R2p0F/o

The white shadows are at 45% opacity, and the black icons/text are at 90% opacity. So an easy way to generate the icon is to create a 50% opacity white shadow, put it underneath the black icon, merge the two, and reduce the opacity of the merged image to 90%.

(If you don't merge the images before decreasing the opacity, the white shadow will shine through the transparent black icon, and then the resulting icon will be gray rather than black.)

codler commented 12 years ago

oh ok, I didnt know or see that every icon had a white shadow underneath, but now I know. It is so small :P

Hm, I have looked around on how to apply this shadow and I cant find any easy way to program this. Ill try some more.

codler commented 12 years ago

How do you take a transparent screenshot?

KelseyHigham commented 12 years ago

Do Shift-Command-4, then press Space, then click on a window. (Menubar icons count as windows.)

Plenty more info here: http://take-a-screenshot.org


Thanks @guillaume-algis and @codler!