osx - Embossing effect in the menubar for NSStatusItem -
i'm developing application icon in mac os status bar.
i add icon with:
self.statusitem = [[nsstatusbar systemstatusbar] statusitemwithlength:nsvariablestatusitemlength]; nsbundle *bundle = [nsbundle mainbundle]; nsimage *connectedimage = [[nsimage alloc] initwithcontentsoffile: [bundle pathforresource: @"drawing" oftype: @"pdf"]]; [self.statusitem setimage:disconnectedimage]; it shows fine without traditional embossing (or shadow) effect apple system status items have: 
you can see on left icon, , on right apple icon effect.
i have tried different image formats without luck. effect present if use internal icon, that:
[self.statusitem setimage:[nsimage imagenamed:nsimagenamelocklockedtemplate]]; should add effect myself image or there obvious i'm missing?
thank you!
you need do
[myimage settemplate:yes]; then system indent you.
Comments
Post a Comment