[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix, nib2gmodel [GMAppKit encodeWithModelArchiver:]
From: |
Georg Fleischmann |
Subject: |
Fix, nib2gmodel [GMAppKit encodeWithModelArchiver:] |
Date: |
Mon, 11 Oct 2004 19:53:11 GMT |
Hi,
here is a little patch for GMAppKit to remove the height of the title bar and
resize bar from 'minSize' of a window.
This is now necessary with version 0.9.4 of GNUstep to keep the panels within
the desired size.
Georg
2004-10-11 Georg Fleischmann
* gui/Model/GMAppKit.m [-encodeWithModelArchiver:]
remove title bar and resize bar from 'minSize'
*** gui/Model/GMAppKit.m.old Thu Jan 22 11:19:08 2004
--- gui/Model/GMAppKit.m Sun Oct 10 19:35:09 2004
***************
*** 1224,1237 ****
- (void)encodeWithModelArchiver:(GMArchiver*)archiver
{
NSPoint wnOrigin = [self frame].origin;
! NSRect ctFrame = [[self contentView] frame];
unsigned int style;
ctFrame.origin = wnOrigin;
[archiver encodeRect:ctFrame withName:@"contentFrame"];
[archiver encodeSize:[self maxSize] withName:@"maxSize"];
! [archiver encodeSize:[self minSize] withName:@"minSize"];
[archiver encodeString:[self frameAutosaveName]
withName:@"frameAutosaveName"];
[archiver encodeInt:[self level] withName:@"level"];
--- 1224,1243 ----
- (void)encodeWithModelArchiver:(GMArchiver*)archiver
{
NSPoint wnOrigin = [self frame].origin;
! NSRect ctFrame = [[self contentView] frame], minRect;
unsigned int style;
ctFrame.origin = wnOrigin;
+ /* convert minSize to GNUstep frame (without title bar and resize bar) */
+ minRect.origin = wnOrigin;
+ minRect.size = [self minSize];
+ minRect = [NSWindow contentRectForFrameRect:minRect
+ styleMask:[self styleMask]];
+
[archiver encodeRect:ctFrame withName:@"contentFrame"];
[archiver encodeSize:[self maxSize] withName:@"maxSize"];
! [archiver encodeSize:minRect.size withName:@"minSize"];
[archiver encodeString:[self frameAutosaveName]
withName:@"frameAutosaveName"];
[archiver encodeInt:[self level] withName:@"level"];
- Fix, nib2gmodel [GMAppKit encodeWithModelArchiver:],
Georg Fleischmann <=