mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 05:10:58 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8816 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aa57ff1a1d
commit
02c8f3078b
1 changed files with 32 additions and 14 deletions
|
@ -82,7 +82,9 @@
|
||||||
|
|
||||||
/* if there are less the two subviews, there is nothing to do */
|
/* if there are less the two subviews, there is nothing to do */
|
||||||
if (count < 2)
|
if (count < 2)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
vis = [self visibleRect];
|
vis = [self visibleRect];
|
||||||
|
|
||||||
|
@ -107,11 +109,13 @@
|
||||||
{ // can happen only when i>0.
|
{ // can happen only when i>0.
|
||||||
NSView *tempView;
|
NSView *tempView;
|
||||||
|
|
||||||
offset = i-1;
|
offset = i - 1;
|
||||||
|
|
||||||
/* get the enclosing rect for the two views */
|
/* get the enclosing rect for the two views */
|
||||||
if (prev)
|
if (prev)
|
||||||
|
{
|
||||||
r = [prev frame];
|
r = [prev frame];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -120,8 +124,10 @@
|
||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (v)
|
if (v != nil)
|
||||||
|
{
|
||||||
r1 = [v frame];
|
r1 = [v frame];
|
||||||
|
}
|
||||||
bigRect = r;
|
bigRect = r;
|
||||||
bigRect = NSUnionRect(r1, bigRect);
|
bigRect = NSUnionRect(r1, bigRect);
|
||||||
tempView = prev; prev = v; v = tempView;
|
tempView = prev; prev = v; v = tempView;
|
||||||
|
@ -136,8 +142,10 @@
|
||||||
offset = i;
|
offset = i;
|
||||||
|
|
||||||
/* get the enclosing rect for the two views */
|
/* get the enclosing rect for the two views */
|
||||||
if (prev)
|
if (prev != nil)
|
||||||
|
{
|
||||||
r = [prev frame];
|
r = [prev frame];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -146,8 +154,10 @@
|
||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (v)
|
if (v != nil)
|
||||||
|
{
|
||||||
r1 = [v frame];
|
r1 = [v frame];
|
||||||
|
}
|
||||||
bigRect = r;
|
bigRect = r;
|
||||||
bigRect = NSUnionRect(r1 , bigRect);
|
bigRect = NSUnionRect(r1 , bigRect);
|
||||||
break;
|
break;
|
||||||
|
@ -186,10 +196,14 @@
|
||||||
ofSubviewAt: offset];
|
ofSubviewAt: offset];
|
||||||
/* we are still constrained by the original bounds */
|
/* we are still constrained by the original bounds */
|
||||||
if (delMinY > minCoord)
|
if (delMinY > minCoord)
|
||||||
|
{
|
||||||
minCoord = delMinY;
|
minCoord = delMinY;
|
||||||
|
}
|
||||||
if (delMaxY < maxCoord)
|
if (delMaxY < maxCoord)
|
||||||
|
{
|
||||||
maxCoord = delMaxY;
|
maxCoord = delMaxY;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float delMinX= minCoord, delMaxX= maxCoord;
|
float delMinX= minCoord, delMaxX= maxCoord;
|
||||||
|
@ -199,11 +213,15 @@
|
||||||
ofSubviewAt: offset];
|
ofSubviewAt: offset];
|
||||||
/* we are still constrained by the original bounds */
|
/* we are still constrained by the original bounds */
|
||||||
if (delMinX > minCoord)
|
if (delMinX > minCoord)
|
||||||
|
{
|
||||||
minCoord = delMinX;
|
minCoord = delMinX;
|
||||||
|
}
|
||||||
if (delMaxX < maxCoord)
|
if (delMaxX < maxCoord)
|
||||||
|
{
|
||||||
maxCoord = delMaxX;
|
maxCoord = delMaxX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
oldRect = NSZeroRect;
|
oldRect = NSZeroRect;
|
||||||
[self lockFocus];
|
[self lockFocus];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue