1

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;
}
Larry
  • 397
  • 3
  • 10

1 Answers1

3

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.

Rob Keniger
  • 45,830
  • 6
  • 101
  • 134