mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
In cascadeTopLeftFromPoint: constrain the resulting point to the visible
screen. Patch by Wolfgang Lux. -- Diese und die folgend:wqIn cascadeTopLeftFromPoint: constrain the resulting point to the visible screen. Patch by Wolfgang Lux.In cascadeTopLeftFromPoint: constrain the resulting point to the visible screen. Patch by Wolfgang Lux.ien Zeilen werden ignoriert -- M Source/NSWindow.m M ChangeLog git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25506 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dc55ca286e
commit
0ed7d134a7
2 changed files with 27 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-09-30 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSWindow.m (-cascadeTopLeftFromPoint:): Adopt the
|
||||
resulting next point to visible screen. Based on patch by
|
||||
Wolfgang Lux <wolfgang.lux@gmail.com>.
|
||||
|
||||
2007-09-13 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTableView.m (-validateEditing): Set object value to
|
||||
|
|
|
@ -1765,13 +1765,30 @@ many times.
|
|||
|
||||
if (NSEqualPoints(topLeftPoint, NSZeroPoint) == YES)
|
||||
{
|
||||
topLeftPoint.x = _frame.origin.x;
|
||||
topLeftPoint.y = _frame.origin.y + _frame.size.height;
|
||||
topLeftPoint.x = NSMinX(_frame);
|
||||
topLeftPoint.y = NSMaxY(_frame);
|
||||
}
|
||||
|
||||
[self setFrameTopLeftPoint: topLeftPoint];
|
||||
cRect = [isa contentRectForFrameRect: _frame styleMask: _styleMask];
|
||||
topLeftPoint.x = cRect.origin.x;
|
||||
topLeftPoint.y = cRect.origin.y + cRect.size.height;
|
||||
topLeftPoint.x = NSMinX(cRect);
|
||||
topLeftPoint.y = NSMaxY(cRect);
|
||||
|
||||
/* make sure the new point is inside the screen */
|
||||
if ([self screen])
|
||||
{
|
||||
NSRect screenRect;
|
||||
|
||||
screenRect = [[self screen] visibleFrame];
|
||||
if (topLeftPoint.x >= NSMaxX(screenRect))
|
||||
{
|
||||
topLeftPoint.x = NSMinX(screenRect);
|
||||
}
|
||||
if (topLeftPoint.y <= NSMinY(screenRect))
|
||||
{
|
||||
topLeftPoint.y = NSMaxY(screenRect);
|
||||
}
|
||||
}
|
||||
|
||||
return topLeftPoint;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue