I've been playing around with NSVisualEffectViews
in Yosemite and transparent titlebars but I was wondering if it's possible to have a custom title bar, with my own base color (not that gray), that would act like Apple's.
Here's my current NSWindow
:
I achieved this look by setting the following code on my custom NSWindowController
:
self.window.styleMask = self.window.styleMask | NSFullSizeContentViewWindowMask;
self.window.titleVisibility = NSWindowTitleHidden;
self.window.titlebarAppearsTransparent = YES;
That blue color is just a custom NSView
that's painting its rect
with that particular color. The content below it is a NSTableView
.
So, the goal was to actually have my titlebar to work like, let's say, Maps but instead of having the "base" color as the gray color, my "base" color would be that blue one and when the NSTableView
scrolls, that content appears below my title bar.
Any ideas on how to achieve this? Thanks
Have you tried setting a blue color with a transparency of, e.g., 0.75 in the blue view, and a NSVisualEffectView
underneath it?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With