Changing the titlebar height in an NSPanel
Pregunta
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;
}
Solución
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.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow