Reputation: 397
I'm trying to change the titlebar height of an NSPanel. I tried the following but it didn't work as expected:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSRect f = [[[window contentView] superview] frame];
f.size.height += 10;
[[window contentView] superview].frame = f;
}
Upvotes: 1
Views: 381
Reputation: 46028
You can't change the height of a window's title bar. It's fixed by the framework. If you want a window with a custom appearance you'll need to create a window using the NSBorderlessWindowMask
style mask and then draw your own title bar and widgets.
Upvotes: 3