mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 05:01:00 +00:00
Position NSAlert panel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38438 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7bcce58ffe
commit
29a168d554
1 changed files with 17 additions and 0 deletions
|
@ -2028,9 +2028,26 @@ void NSBeginInformationalAlertSheet(NSString *title,
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue