NSWindow resizing to incorrect height
NSWindow resizing to incorrect height
- Subject: NSWindow resizing to incorrect height
- From: Michael Jurewitz <email@hidden>
- Date: Wed, 15 Jun 2005 13:39:24 -0500
I have the following method for taking the size of a new view to be transitioned to and resizing the window appropriately:
- (void)resizeWindowToSize: (NSSize)newSize { NSRect aFrame;
float newHeight = newSize.height; float newWidth = newSize.width;
aFrame = [NSWindow contentRectForFrameRect:[mainWindow frame] styleMask:[mainWindow styleMask]];
aFrame.origin.y += aFrame.size.height - newHeight;
aFrame.size.height = newHeight; aFrame.size.width = newWidth;
aFrame = [NSWindow frameRectForContentRect:aFrame styleMask:[mainWindow styleMask]];
[mainWindow setFrame:aFrame display:YES animate:YES]; }
There seems to be an issue, I think related to the window styleMask, that makes the NSWindow transition to a window height that is too short, causing the view to get slightly squished. I'm using a unified toolbar view along with icons that have text below them. Can anyone see what might be causing this to happen or offer some suggestions?
-Michael Jurewitz
********************************************* Northwestern University
2341 Sheridan Road Evanston, IL 60201
Room: 847-332-9515 Cell: 909-717-5474 *********************************************
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden