问题
I'm writing an app for OS X (in REALbasic, not Objective-C). I have implemented a source list (i.e. the sidebar in iTunes) in this app.
Where on my system can I find the "standard" icons used on a sidebar, i.e: things like the "eject" and "battery" icon seen in iTunes when your iPod is plugged in. I've checked the iTunes package contents and have found a couple (stuff like the Music and TV shows icons) but that is all.
Thanks,
回答1:
The standard icons are those defined in Icon Services and NSImage. There are none specifically for sidebars, and the two examples you list are not among the standard icons. (There is a kEjectMediaIcon
in Icon Services, but it's the one the Dock uses, not the one you see in Finder and iTunes.)
iTunes may or may not be using an image for this, but the Eject symbol is available as a standard Unicode character: ⏏. (If you don't like how that looks, view it in a different font. Apple Symbols and Lucida Grande both have good versions.)
As for the battery icon: If you open up Linotype FontExplorer, you can see that Apple Symbols has a glyph for it (waaaay down near the bottom of the font's Characters list), but it's only accessible as a glyph variant. Even once you draw the glyph, you'll still need to fill it in with the battery level, so you might as well draw the whole thing yourself.
来源:https://stackoverflow.com/questions/3654420/where-can-i-find-apples-standard-source-list-sidebar-icons