On Saturday, March 15, 2003, at 04:20 pm, Willem Rein Oudshoorn wrote:


Michael Hanni <[EMAIL PROTECTED]> writes:

In NSMenu.m, sizeToFit: make this modification (I'd send a patch, but the
blasted CVS server is not responding.)


  windowFrame = [_aWindow frame];
  [_aWindow setFrame: NSMakeRect(NSMinX(windowFrame),
                                 (NSMaxY(windowFrame) - size.height),
                                 size.width,
                                 size.height)
             display: NO];

Hm, this is almost OK, but there is a difference between setting the frame.size of a window and setting the contentSize. When setting the contentSize the window will account for the window decoration, when setting the frame it does not.

Yep ... if you need to change the size of the contents of a window while
keeping the top left point the same, you need to use
+frameRectForContentRect:styleMask: to get the size of frame required,
then (if necessary) adjust the frame rect origin so that the top left corner
is the same as the current frame rect of the window, then call
-setFrame:display: to make the change.





_______________________________________________ Bug-gnustep mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to