mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Fixed window/panel palette.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@15075 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dbcbba733b
commit
ffaf1174f0
2 changed files with 26 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2002-11-23 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/1Windows/main.m: Added code to
|
||||
-[GormPanelMaker initWithCoder:] and -[GormWindowMaker initWithCoder:]
|
||||
to order the window/panel to the front when added. Previously, it
|
||||
was difficult to find the window/panel after adding it.
|
||||
|
||||
2002-11-23 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormDocument.m: Modified removeConnectionsWithLabel:.. to return
|
||||
|
|
|
@ -40,12 +40,20 @@
|
|||
id w;
|
||||
unsigned style = NSTitledWindowMask | NSClosableWindowMask
|
||||
| NSResizableWindowMask | NSMiniaturizableWindowMask;
|
||||
NSRect screenRect = [[NSScreen mainScreen] frame];
|
||||
float
|
||||
x = (screenRect.size.width - 500)/2,
|
||||
y = (screenRect.size.height - 300)/2;
|
||||
NSRect windowRect = NSMakeRect(x,y,500,300);
|
||||
|
||||
w = [[GormNSWindow alloc] initWithContentRect: NSMakeRect(0, 0, 500, 300)
|
||||
// NSLog(@"Making window %@ on screen: %@",NSStringFromRect(windowRect),NSStringFromRect(screenRect));
|
||||
w = [[GormNSWindow alloc] initWithContentRect: windowRect
|
||||
styleMask: style
|
||||
backing: NSBackingStoreRetained
|
||||
defer: NO];
|
||||
[w setFrame: windowRect display: YES];
|
||||
[w setTitle: @"Window"];
|
||||
[w orderFront: self];
|
||||
RELEASE(self);
|
||||
return w;
|
||||
}
|
||||
|
@ -66,12 +74,20 @@
|
|||
id w;
|
||||
unsigned style = NSTitledWindowMask | NSClosableWindowMask
|
||||
| NSResizableWindowMask | NSMiniaturizableWindowMask;
|
||||
|
||||
w = [[NSPanel alloc] initWithContentRect: NSMakeRect(0, 0, 500, 300)
|
||||
NSRect screenRect = [[NSScreen mainScreen] frame];
|
||||
float
|
||||
x = (screenRect.size.width - 500)/2,
|
||||
y = (screenRect.size.height - 300)/2;
|
||||
NSRect windowRect = NSMakeRect(x,y,500,300);
|
||||
|
||||
// NSLog(@"Making panel %@",NSStringFromRect(windowRect));
|
||||
w = [[NSPanel alloc] initWithContentRect: windowRect
|
||||
styleMask: style
|
||||
backing: NSBackingStoreRetained
|
||||
defer: NO];
|
||||
[w setFrame: windowRect display: YES];
|
||||
[w setTitle: @"Panel"];
|
||||
[w orderFront: self];
|
||||
RELEASE(self);
|
||||
return w;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue