Author: mlytwyn Date: Thu Mar 26 23:06:52 2015 New Revision: 38438 URL: http://svn.gna.org/viewcvs/gnustep?rev=38438&view=rev Log: Position NSAlert panel
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSAlert.m Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSAlert.m URL: http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSAlert.m?rev=38438&r1=38437&r2=38438&view=diff ============================================================================== --- libs/gui/branches/gnustep_testplant_branch/Source/NSAlert.m (original) +++ libs/gui/branches/gnustep_testplant_branch/Source/NSAlert.m Thu Mar 26 23:06:52 2015 @@ -2028,9 +2028,26 @@ didEndSelector: (SEL)didEndSelector contextInfo: (void *)contextInfo { + NSRect frame = [window frame]; + NSPoint point = frame.origin; + NSSize size; + CGFloat width; + + // Ssetup... [self _setupPanel]; + + // Position window... + size = [_window frame].size; + point = NSMakePoint(NSMinX(frame), NSMaxY(frame)-size.height); + width = frame.size.width - size.width; + point.x += width / 2; + point.y -= size.height; + [_window setFrameOrigin:point]; + + // Save parameters... _modalDelegate = delegate; _didEndSelector = didEndSelector; + [NSApp beginSheet: _window modalForWindow: window modalDelegate: self _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs