Custom NSWindow drawing
I want to draw an NSWindow that looks similar to this:
http://vibealicious.com/site/apps/notify/screenshots/mainUIFull.png
In that it has a typical NSWindow appearance with the bottom bar and such, but instead of a title bar at the top, I want to draw a little arrow.
Is there a simple way to do this? Do I have to draw the entire window by hand (bottom bar and all) ? Or can I slightly modify the existing NSWindow l开发者_如何学Cayout to just draw that arrow at the top? Thanks
You could possibly fake the title bar by using a second child window that overlays the top section of the window and draws just the arrow. Otherwise, you'd need to draw the whole thing yourself.
Not sure what you mean by a simple way to do it, but it's not very hard to make your own window subclass and draw the window controls yourself. A child window would be a bit of overkill for this situation.
Have a look at the Round Transparent Window sample project.
精彩评论